Problem in svmtrain : Help
Afficher commentaires plus anciens
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.
Réponses (1)
the cyclist
le 19 Avr 2014
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 commentaires
hamed abdulaziz
le 19 Avr 2014
Modifié(e) : hamed abdulaziz
le 19 Avr 2014
Anannya Sinha
le 10 Nov 2016
Can we try this with images ?
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!