One gets an set of scores only no documented way to map the value to class.
Perhaps add some samples like:
var predEngine = mlContext.Model.CreatePredictionEngine<IrisData, IrisPrediction>(trainedModel);
VBuffer<float> keys = default;
predEngine.OutputSchema["PredictedLabel"].GetKeyValues(ref keys);
var labelsArray = keys.DenseValues().ToArray();
for (var i = 0; i < keys.Length; i++)
Console.WriteLine($"key {labelsArray[i]} = {metrics.PerClassLogLoss[i]:P4}");
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
One gets an set of scores only no documented way to map the value to class.
Perhaps add some samples like:
var predEngine = mlContext.Model.CreatePredictionEngine<IrisData, IrisPrediction>(trainedModel);
VBuffer<float> keys = default;
predEngine.OutputSchema["PredictedLabel"].GetKeyValues(ref keys);
var labelsArray = keys.DenseValues().ToArray();
for (var i = 0; i < keys.Length; i++)
Console.WriteLine($"key {labelsArray[i]} = {metrics.PerClassLogLoss[i]:P4}");
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.