Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Created July 22, 2020 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdfarragher/7f6ca2af491b1c46ff2ddf7f2e55b0ae to your computer and use it in GitHub Desktop.
Save mdfarragher/7f6ca2af491b1c46ff2ddf7f2e55b0ae to your computer and use it in GitHub Desktop.
// make predictions and compare with the ground truth
let metrics = partitions.TestSet |> model.Transform |> context.BinaryClassification.Evaluate
// report the results
printfn "Model metrics:"
printfn " Accuracy: %f" metrics.Accuracy
printfn " Auc: %f" metrics.AreaUnderRocCurve
printfn " Auprc: %f" metrics.AreaUnderPrecisionRecallCurve
printfn " F1Score: %f" metrics.F1Score
printfn " LogLoss: %f" metrics.LogLoss
printfn " LogLossReduction: %f" metrics.LogLossReduction
printfn " PositivePrecision: %f" metrics.PositivePrecision
printfn " PositiveRecall: %f" metrics.PositiveRecall
printfn " NegativePrecision: %f" metrics.NegativePrecision
printfn " NegativeRecall: %f" metrics.NegativeRecall
// the rest of the code goes here....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment