Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/// <summary>
/// Ussing passed testing data and model, it calculates model's accuracy.
/// </summary>
/// <returns>Accuracy of the model.</returns>
public double Evaluate(PredictionModel<IrisFlower, IrisPredict> model, string testDataLocation)
var testData = new TextLoader(testDataLocation).CreateFrom<IrisFlower>(useHeader: true, separator: ',');
var metrics = new ClassificationEvaluator().Evaluate(model, testData);
return metrics.AccuracyMacro;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment