필터 지우기
필터 지우기

How to converting cell to matrix for image based classification?

조회 수: 2 (최근 30일)
Nikhat Ali
Nikhat Ali 2021년 8월 31일
답변: Robert U 2021년 9월 1일
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
  댓글 수: 2
KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 8월 31일
편집: KALYAN ACHARJYA 2021년 8월 31일
Have you tried with cell2mat of train vector, then apply the same?
Nikhat Ali
Nikhat Ali 2021년 8월 31일
Yes I tried using that, it converts the cell to matrix. But still having error as training label and train vector not have same size.

댓글을 달려면 로그인하십시오.

채택된 답변

Robert U
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개)

카테고리

Help CenterFile Exchange에서 Classification에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by