Created
January 20, 2016 05:41
-
-
Save sudipto80/83016f615a6ed8589a58 to your computer and use it in GitHub Desktop.
Root mean squared error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//root mean squared error | |
let rmse(ratings:float list)(predictions:float list) = | |
sqrt(( List.zip ratings predictions |> List.map (fun t -> fst t - snd t) |> List.sum ) | |
/(float predictions.Length )) | |
rmse [1.3;4.5] [4.1;0.41] |> Dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment