MATLAB: How to get the index for each data point in SOM or how do I compute the class vectors of each of the training inputs ??
2 ビュー (過去 30 日間)
古いコメントを表示
In MATLAB, clustering data using kmeans can be achieved as shown below:
L = kmeans(X,k,Name,Value) where L is cluster indices which is for each data point.
It implies that is if I have 307 data points I'm to have a 307 x 1 array(L) which is the index for each data point.
However, while using SOM for clustering I discovered to get the index you use the code snippet below:
net = selforgmap([dimension1 dimension2]);
% Train the Network
[net,tr] = train(net,X);
%get indices
L = vec2ind(net(X));
for a Network with 5 x 5 dimension:
it returns L which is an array with the dimesion 25 x 1 instead of 307 x 1 for a Network with 10 x 10 dimension:
it returns L which is an array with the dimesion 100 x 1 instead of 307 x 1
What am I doing wrong???
or to simply put, how do I compute the class vectors of each of the training inputs ?
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Function Approximation, Clustering, and Control についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!