开发者

MATLAB: Self-Organizing Map (SOM) clustering

I'm trying to cluster some images depending on the angles between body parts.

The features extracted from each image are:

angle1 : torso - torso
angle2 : torso - upper left arm
..
angle10: torso - lower right foot

Therefore the input data is a matrix of size 1057x10, where 1057 stands for the number of images, and 10 stands for angles of body parts with torso. Similarly a testSet is 821x10 matrix.

I want all the rows开发者_StackOverflow in input data to be clustered with 88 clusters. Then I will use these clusters to find which clusters does TestData fall into?

In a previous work, I used K-Means clustering which is very straightforward. We just ask K-Means to cluster the data into 88 clusters. And implement another method that calculates the distance between each row in test data and the centers of each cluster, then pick the smallest values. This is the cluster of the corresponding input data row.

I have two questions:

  1. Is it possible to do this using SOM in MATLAB? AFAIK SOM's are for visual clustering. But I need to know the actual class of each cluster so that I can later label my test data by calculating which cluster it belongs to.

  2. Do you have a better solution?


Self-Organizing Map (SOM) is a clustering method considered as an unsupervised variation of the Artificial Neural Network (ANN). It uses competitive learning techniques to train the network (nodes compete among themselves to display the strongest activation to a given data)

MATLAB: Self-Organizing Map (SOM) clustering

You can think of SOM as if it consists of a grid of interconnected nodes (square shape, hexagonal, ..), where each node is an N-dim vector of weights (same dimension size as the data points we want to cluster).

The idea is simple; given a vector as input to SOM, we find the node closet to it, then update its weights and the weights of the neighboring nodes so that they approach that of the input vector (hence the name self-organizing). This process is repeated for all input data.

MATLAB: Self-Organizing Map (SOM) clustering

The clusters formed are implicitly defined by how the nodes organize themselves and form a group of nodes with similar weights. They can be easily seen visually.

MATLAB: Self-Organizing Map (SOM) clustering

SOM are in a way similar to the K-Means algorithm but different in that we don't impose a fixed number of clusters, instead we specify the number and shape of nodes in the grid that we want it to adapt to our data.

Basically when you have a trained SOM, and you want to classify a new test input vector, you simply assign it to the nearest (distance as a similarity measure) node on the grid (Best Matching Unit BMU), and give as prediction the [majority] class of the vectors belonging to that BMU node.

MATLAB: Self-Organizing Map (SOM) clustering

For MATLAB, you can find a number of toolboxes that implement SOM:

  • The Neural Network Toolbox from MathWorks can be used for clustering using SOM (see the nctool clustering tool).
  • Also worth checking out is the SOM Toolbox
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜