Cluster data into two classes using SOM

12 views (last 30 days)
Omar Geberi
Omar Geberi on 23 Jan 2018
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

Answers (0)

Categories

Find more on Function Approximation, Clustering, and Control in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!