How can i apply SVM or other classification methods on a cell array?

2 ビュー (過去 30 日間)
Anamika jain
Anamika jain 2019 年 8 月 19 日
回答済み: Pravin Jagtap 2019 年 8 月 22 日
I have a cell array of size 2400*5. Each cell contain double array of size 30*1. and the 5th column of each row has the label of that image. can u please suggest a method for classifiation of this type of array.

採用された回答

Pravin Jagtap
Pravin Jagtap 2019 年 8 月 22 日
Hello Anamika,
I am assuming you want data points along column and features along row direction.
Follow the following steps to covert the data into required form:
% Step 1. Create sub cell array
X_cellArray=Data(:,1:4) ;
Y_cellArray(:,5);
% Step 2. Transpose the X_cellArray
X_cellArray=X_cellArray';
% Step 3. Convert X_cellArray from 'cell array’ to ‘matrix’ form
X_Array = cell2mat(X_cellArray);
Y_Array = cell2mat(Y_cellArray);
% Step 4. Transpose the X_Array
X_Array= X_Array';
After this 'X_array' will be 2400X(30*1*4) and 'Y_array' will be 2400X1
Kind Regards
~Pravin

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by