Cluster data into two classes using SOM
11 次查看(过去 30 天)
显示 更早的评论
I need to Cluster data of 1200 vectors (1200 X 500) using SOM in two dimensions x and y, so that X and y are separated with line to describe the 2 classes, the main class and the out-layers. I have written the following code for this purpose, but i feel i am not receiving the required results. Your Help is much appreciated.
clc
filename = 'FFW.txt';
delimiterIn = '\t';
All= importdata(filename,delimiterIn);
% data - input data.
x = All.data;
% Create a Self-Organizing Map with 100 Neuron grid
dimension1 = 10;
dimension2 = 10;
net = selforgmap([dimension1 dimension2]);
% Train the Network on 50% of the input data
net.trainParam.epochs = 2;
[net,tr] = train(net,x);
% Test the Network on 50% of the input data different from training data
y = net(x);
% View the Network
view(net);
% Plots : The result shows two main clusters in the resulting data
figure, plotsomnd(net);
Thank you Hope
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!