Cluster data into two classes using SOM

조회 수: 6 (최근 30일)
Omar Geberi
Omar Geberi 2018년 1월 23일
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개)

카테고리

Help CenterFile 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!

Translated by