Created
June 23, 2018 12:54
-
-
Save NMZivkovic/33fac1263cf8a902a18a3f4967fe2a86 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 RegressionMetrics Evaluate(PredictionModel<BikeSharingDemandSample, BikeSharingDemandPrediction> model, string testDataLocation) | |
{ | |
var testData = new TextLoader(testDataLocation).CreateFrom<BikeSharingDemandSample>(useHeader: true, separator: ','); | |
var metrics = new RegressionEvaluator().Evaluate(model, testData); | |
return metrics; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment