フィルターのクリア

How to get label order w.r.t. scores from classification?

2 ビュー (過去 30 日間)
Jack Latham
Jack Latham 2018 年 4 月 12 日
回答済み: Alok Nimrani 2018 年 4 月 26 日
I've got a number of different neural network models, which I can classify images by using,
[Labels, scores] = classify(net,X)
is there a quick way to output the order of the scores? i.e. which label each 'scores column' corresponds to? Thanks

回答 (1 件)

Alok Nimrani
Alok Nimrani 2018 年 4 月 26 日
Hi Jack,
The label for each row is the ith label out of all possible labels and the value 'i' is the column having the max score for the corresponding row. So, you can obtain the corresponding 'scores' column for each label by finding the index of the max value for every row in 'scores' as follows:
[~,index] = max(scores,[],2);
Hope this helps.
Thanks

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by