Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/d810ec9bad2f12c0e6d66c8c9c8a1dd6 to your computer and use it in GitHub Desktop.
Save NMZivkovic/d810ec9bad2f12c0e6d66c8c9c8a1dd6 to your computer and use it in GitHub Desktop.
private static void VisualizeTenPredictionsForTheModel(
PredictionModel<WineQualitySample, WineQualityPrediction> model,
string testDataLocation)
{
var testData = new WineQualityCsvReader().GetWineQualitySamplesFromCsv(testDataLocation).ToList();
for (int i = 0; i < 10; i++)
{
var prediction = model.Predict(testData[i]);
Console.WriteLine($"-------------------------------------------------");
Console.WriteLine($"Predicted : {prediction.PredictedLabel}");
Console.WriteLine($"Actual: {testData[i].Label}");
Console.WriteLine($"-------------------------------------------------");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment