Created
June 17, 2018 08:12
-
-
Save NMZivkovic/42cd77b82ff7b207a1a1b3320210edcd to your computer and use it in GitHub Desktop.
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
/// <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