Skip to content

Instantly share code, notes, and snippets.

@sudipto80
Created January 20, 2016 05:41
Show Gist options
  • Save sudipto80/83016f615a6ed8589a58 to your computer and use it in GitHub Desktop.
Save sudipto80/83016f615a6ed8589a58 to your computer and use it in GitHub Desktop.
Root mean squared error
//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