I want to use K-means clustering for my features which are of size 286 x 276
, So I can do clustering before using SVM. These features are of 16 different gestures. I am using MATLAB function IDX=kmeans(Feat_train,16)
. In IDX variable I am getting vector of size 286x1
in which their is numbers in between 1-16 randomly. I am not understanding what that number shows and what I have to next for giving input to SVM for training.
Asked
Active
Viewed 325 times
0
-
What is _Feat_train_, and what is `286x276`? Vector IDX contains cluster indices of each point. – dbs Feb 11 '15 at 11:04
-
`Feat_train` is the variable which contain features for training. and `286x276` is the size of the `Feat_train` matrix in which each feature is arranged row-wise – Frq Khan Feb 11 '15 at 11:25
2 Answers
1
The way you invoked kmeans
in Matlab with your 286-by-276 feature matrix, kmeans
assume you have 286 1D vectors in a 276-dimensional space. kmeans
then tries to find k=16
centers best representing your 286 high-dimensional points.
Finally, it gives back IDX
: an index per point telling you to which of the 16 centers this point belongs to.
It is now up to you to decide how to feed this information into an SVM machinery.

Shai
- 111,146
- 38
- 238
- 371
-
Actually my features are arranged row-wise so `286` rows are the total number of features. I mean can I use these directly in `IDX` in svmtrain(Feat_train, IDX)? – Frq Khan Feb 11 '15 at 11:15