필터 지우기
필터 지우기

How to label unlabeled data(e.g. 200*2 matrix) in Self Organizing Map?

조회 수: 3 (최근 30일)
Hallo Everybody,
I need a little help.
I have a 200*2 matrix, which contains 200 samples of 2 variable. i want to map this dataset in Self Organizing Map. I already did. But i want to have U-Matrix (Unified Distance Matrix), which shows that, which data samples(Variable 1 or 2) clustered in which neuron?
I guess i have to label the dataset. But how can i label my dataset?
What is the matlab command to test a dataset in a trained SOM network?
I am using MATLAB 2017a.
I will be very greatful if someone help me to get out of this prolam.
Thank you in anticipation.
with Regards
Zobaer

채택된 답변

Hossain Ahmed Zobaer
Hossain Ahmed Zobaer 2019년 12월 8일
If you already know the label of histirical data, then you can just make an cell array and labeled them as the historical dataset. Then you can train them with SOM and can find the node positions.
With Regards
Zobaer

추가 답변 (1개)

Filipe Fernandes
Filipe Fernandes 2019년 6월 24일
If you have the target of each sample, you can use only the text of the function. This function will plot a string or character in any desired position. Here an example using iris dataset
% Load dataset
[input, Target] = iris_dataset;
[~, Target] = max(Target);
net = selforgmap();
% training
net = train(net, input);
plotsomnd(net,input);
% position (x y) of the center of each neuron
pos = net.layers{:}.positions;
output = net(input);
for cont = 1 : length(pos)
samples = find(output(cont,:));
if ~isempty(samples)
TargetSamples = unique(Target(samples));
text(pos(1,cont),pos(2,cont),num2str(TargetSamples))
end
end
teste.png
I hope I have answered your question.

카테고리

Help CenterFile Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by