Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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