Search code examples
.netmachine-learningml.netml.net-model-builder

How to analyze array of scores given by prediction in multiclass classification in ml.net?


I have created a Multiclass classification project in ML.NET. This project classifies the errors and predicts the type of error the model thinks it is.

For e.g. Object reference not set to an instance of an object is a "runtime" error.

This works fine and I am able to do predictions. However, I also need to know how confident the prediction is. I am getting scores in an array with multiple values. I am not sure how to interpret these values.

enter image description here


Solution

  • Each one of them is the probability that it is correct (number between 0 and 1). There is one for every class in your data. Looking at the screenshot, you have 120 different types of error. These 120 confidence scores should sum to 1.

    The prediction is chosen as the element with the highest confidence score. So to find the confidence of the prediction you can simply find the largest number in the array.