Created
July 1, 2018 16:18
-
-
Save NMZivkovic/d03534e36acb65576650e8e36a429fae 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
public class ModelEvaluator | |
{ | |
/// <summary> | |
/// Ussing passed testing data and model, it calculates model's accuracy. | |
/// </summary> | |
/// <returns>Accuracy of the model.</returns> | |
public BinaryClassificationMetrics Evaluate(PredictionModel<WineQualitySample, WineQualityPrediction> model, string testDataLocation) | |
{ | |
var testData = new TextLoader(testDataLocation).CreateFrom<WineQualitySample>(useHeader: true, separator: ';'); | |
var metrics = new BinaryClassificationEvaluator().Evaluate(model, testData); | |
return metrics; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment