How would i do it in matlab?

1 Ansicht (letzte 30 Tage)
Sheema Khattak
Sheema Khattak am 27 Apr. 2014
Beantwortet: Apdullah YAYIK am 27 Apr. 2014
How would images be assigned numerical values in matrices for classification multiclass svm in matlab? How would I specify that group 1=apple,group 2 = orange and group3=banana?
  1 Kommentar
dpb
dpb am 27 Apr. 2014
Not fully clear but if have Statistics Toolbox, look at
doc nominal

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Apdullah YAYIK
Apdullah YAYIK am 27 Apr. 2014
You have 1x1 features of different types of images. Rename them as "featureset_image"
Add class information as numeric to feature matrix with "dataset" function
If you have 500 apple, 500 banana and 500 orange your class vector is;
class=[ones(1,500)';2*ones(1,500)';3*ones(1,500)];
And DataSet is
dataset_image=dataset(featureset_image, class)

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by