-
-
Save indraone01/e286541926c18740673338b19a872112 to your computer and use it in GitHub Desktop.
This code is part of the ML.NET taxi fare prediction demo.
This file contains 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
// get a set of predictions | |
Console.Write("Evaluating the model...."); | |
var predictions = model.Transform(partitions.TestSet); | |
// get regression metrics to score the model | |
var metrics = mlContext.Regression.Evaluate(predictions, "Label", "Score"); | |
Console.WriteLine("done"); | |
// show the metrics | |
Console.WriteLine(); | |
Console.WriteLine($"Model metrics:"); | |
Console.WriteLine($" RMSE: {metrics.Rms:#.##}"); | |
Console.WriteLine($" L1: {metrics.L1:#.##}"); | |
Console.WriteLine($" L2: {metrics.L2:#.##}"); | |
Console.WriteLine(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment