Skip to content

Perhaps show how to understand what class has what score #3672

Description

@PeterPann23

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.

Metadata

Metadata

Assignees

Labels

documentationRelated to documentation of ML.NET

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions