LSTM get percentage of each class

조회 수: 6 (최근 30일)
Laura Gabriela
Laura Gabriela 2021년 6월 19일
답변: Vimal Rathod 2021년 6월 23일
Hi! Is there a way to get a percantage of each class from a classifier?
For example: I have 5 classes: Sit, Eat, Drink, Run and Sleep
I am giving some data to the trained classifier and it predicts one of the classes.
Can it give me something like: Sit 90%, Eat 2% Drink 5% Run 2% and Sleep 1%?
Like for each line of input to give me all the existing classes and the probability.
The reason why i want this is that i am trying to classify some activities that sometimes may happen in the same time. And i would like to see which have some kind of big percentage, let's say over 50%, then this 2 activities are happening.
Is there a way?

채택된 답변

Vimal Rathod
Vimal Rathod 2021년 6월 23일
Hi,
You could use "predict" function to predict indiviual prediction probabilities. You can multiply by 100 to get the percentages of each class.
Refer to the following link to know more about predict function in LSTM.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by