How to resolve the algorithm Diversity prediction theorem step by step in the jq programming language
How to resolve the algorithm Diversity prediction theorem step by step in the jq programming language
Table of Contents
Problem Statement
The wisdom of the crowd is the collective opinion of a group of individuals rather than that of a single expert. Wisdom-of-the-crowds research routinely attributes the superiority of crowd averages over individual judgments to the elimination of individual noise, an explanation that assumes independence of the individual judgments from each other. Thus the crowd tends to make its best decisions if it is made up of diverse opinions and ideologies.
Scott E. Page introduced the diversity prediction theorem:
Therefore, when the diversity in a group is large, the error of the crowd is small.
For a given true value and a number of number of estimates (from a crowd), show (here on this page):
Use (at least) these two examples:
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Diversity prediction theorem step by step in the jq programming language
Source code in the jq programming language
def diversitytheorem($actual; $predicted):
def mean: add/length;
($predicted | mean) as $mean
| { avgerr: ($predicted | map(. - $actual) | map(pow(.; 2)) | mean),
crderr: pow($mean - $actual; 2),
divers: ($predicted | map(. - $mean) | map(pow(.;2)) | mean) } ;
# The task:
([49, [48, 47, 51]],
[49, [48, 47, 51, 42]
])
| . as [$actual, $predicted]
| diversitytheorem($actual; $predicted)
You may also check:How to resolve the algorithm Chaocipher step by step in the Groovy programming language
You may also check:How to resolve the algorithm Currying step by step in the C# programming language
You may also check:How to resolve the algorithm Goldbach's comet step by step in the C++ programming language
You may also check:How to resolve the algorithm First power of 2 that has leading decimal digits of 12 step by step in the C# programming language
You may also check:How to resolve the algorithm Hello world/Newbie step by step in the SQL PL programming language