ML.net How do I get value string for more than just the predicted result?

Alan Iwashita 96 Reputation points
2021-08-23T04:44:23.287+00:00

Forgive me... I am a beginner at this. I created & trained a model with the wizard. It is a text classification model. I would like to know the top 5 predictions and their scores. The default code is...

    public static ModelOutput Predict(ModelInput input)
    {
        ModelOutput result = PredictionEngine.Value.Predict(input);
        return result;
    }

result gives the string of the top prediction and an array of floats which I assume is the scores of the possible answers (I could be wrong). How would I find out what the second best answer's string?

.NET Machine learning
.NET Machine learning
.NET: Microsoft Technologies based on the .NET software framework.Machine learning: A type of artificial intelligence focused on enabling computers to use observed data to evolve new behaviors that have not been explicitly programmed.
156 questions
0 comments No comments
{count} votes

Accepted answer
  1. Alan Iwashita 96 Reputation points
    2021-08-23T06:35:50.087+00:00

    I may have found the answer to my own question...
    https://blog.hompus.nl/2020/09/14/get-all-prediction-scores-from-your-ml-net-model/

    I still need to try it out, but since there's other watchers I thought I'd share it.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.