By using AWS re:Post, you agree to the Terms of Use

Linear Learner - Multiclass classification - Prediction Scores


I am using the linear learner algo for multiclass classification with 5 classes and 9 features

I'm trying to figure out what the scores relate to? After getting the predicted_label result I get 5

{"score": [0.0003054474655073136, 0.8110334873199463, 0.0521857813000679, 0.1320497989654541, 0.004425559192895889], "predicted_label": 1.0}


{"score": [0.0001415203878423199, 0.11968196928501129, 0.8732749223709106, 0.006143826059997082, 0.0007577905780635774], "predicted_label": 2.0}

Does each score relate to a class? I have tried searching the internet for an explanation but so far cannot find anything, hopefully someone can enlighten me


asked 4 years ago16 views
2 Answers

Thanks for using SageMaker. The scores returned by multiclass models are the predicted probabilites for each class.

In your first example, the model is predicting class 1 with 81% confidence, and in your second example, the model is predicting class 2 with 87% confidence.

In general, to interpret the score from classification models, you have to consider the loss function. If the loss is logistic for binary classification or softmax_loss for multiclass classification, then the score can be interpreted as a probability. These are the default losses used by Linear Learner. But if the loss is hinge_loss, then the score cannot be interpreted as a probability. This is because hinge loss corresponds to a Support Vector Classifier, which does not produce probability estimates.

answered 4 years ago

Great, many thanks for the explanation

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions