How would i do it in matlab?

1 回表示 (過去 30 日間)
Sheema Khattak
Sheema Khattak 2014 年 4 月 27 日
回答済み: Apdullah YAYIK 2014 年 4 月 27 日
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 件のコメント
dpb
dpb 2014 年 4 月 27 日
Not fully clear but if have Statistics Toolbox, look at
doc nominal

サインインしてコメントする。

回答 (1 件)

Apdullah YAYIK
Apdullah YAYIK 2014 年 4 月 27 日
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)

Community Treasure Hunt

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

Start Hunting!

Translated by