How to converting cell to matrix for image based classification?
1 回表示 (過去 30 日間)
古いコメントを表示
To train my data using SVM classifier, I am using 'fitcecoc' function, the input argument it takes must be matrix or table.
I am trying basic classification using only images not doing any feature extractiion. The feature vector that I created consist of nested cell which I am not able to convert into matrix. Please help
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/725529/image.png)
2 件のコメント
KALYAN ACHARJYA
2021 年 8 月 31 日
編集済み: KALYAN ACHARJYA
2021 年 8 月 31 日
Have you tried with cell2mat of train vector, then apply the same?
採用された回答
Robert U
2021 年 9 月 1 日
Hi Nikhat Ali,
Please have a look into documentation fitcecoc(). The way you call the function is not working since data format and data dimensions is not correct.
"trainvector" must be data type "double" or "single". Plus, the matrix is supposed to be sparse or full, and the length of "trainingLabels" must correspond to the number of observations.
I suppose, neither data type nor number of observations fit.
Kind regards,
Robert
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Classification Ensembles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!