Problem in svmtrain : Help
古いコメントを表示
I want to use SVMStruct = svmtrain(Training,Group) for classification But each element in the Training matrix is represented by cell array so after run that I got this error :
*Error using svmtrain (line 241)
TRAINING must be a numeric matrix.*
Could anyone guide how to correct this error,thank you.
回答 (1 件)
the cyclist
2014 年 4 月 19 日
One way to convert cell array categories to numerical categories is illustrated by the followign example:
Training = {'A','B','B','A','C','C'};
uniqueTraining = unique(Training);
[~,numericalTraining] = ismember(Training,uniqueTraining)
2 件のコメント
hamed abdulaziz
2014 年 4 月 19 日
編集済み: hamed abdulaziz
2014 年 4 月 19 日
Anannya Sinha
2016 年 11 月 10 日
Can we try this with images ?
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!