Evaluate performance of Self-organizing map for classification

96 Views Asked by At

I'm trying to use a Self-Organizing map (SOM) as a clustering method on the Iris dataset.

% Load dataset
load iris.dat
X = iris(:,1:end-1);
true_labels = iris(:,end);

% Train SOM
net = newsom(X',[10,10],'hextop','linkdist');
net.trainParam.epochs = 100;
net = train(net,X');

% Assign examples to clusters
outputs = sim(net,X');
[~,assignment]  =  max(outputs);

How can I evaluate the performance of this SOM? I tried to compute the Adjusted Rand Index (ARI) between the true_labels and the assignments, but I don't know if this makes any sense. The ARI seems to converge to 0 for a large grid.

1

There are 1 best solutions below

3
On

SOM is not really a clustering algorithm, it is a representation learning method. Once you trained your SOM you can now project your data onto closest neurons and use their positions as new representation, where you run your favourite clustering algorithm. The only way in which SOM "is a clustering method" is if you run it with grid size equal to number of clusters. So for Iris, where you have 3 classes you would need a network that is just 3 nodes. Probably in a shape of a triangle graph wise.