Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
(defn diversity-theorem [truth predictions]
|
||||
(let [square (fn[x] (* x x))
|
||||
mean (/ (reduce + predictions) (count predictions))
|
||||
avg-sq-diff (fn[a] (/ (reduce + (for [x predictions] (square (- x a)))) (count predictions)))]
|
||||
{:average-error (avg-sq-diff truth)
|
||||
:crowd-error (square (- truth mean))
|
||||
:diversity (avg-sq-diff mean)}))
|
||||
|
||||
(println (diversity-theorem 49 '(48 47 51)))
|
||||
(println (diversity-theorem 49 '(48 47 51 42)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue