Clustering  kmeans & SOM
Chapters
 General Terms and tools
 PCA
 PCA
 Hebbian Learning
 KernelPCA
 Source Separation
 ICA
 Infomax ICA
 Second Order Source Separation
 FastICA
 Stochastic Optimization
 Clustering
 kmeans Clustering
 Pairwise Clustering
 SelfOrganising Maps
 Locally Linear Embedding
 Estimation Theory
 Density Estimation
 Kernel Density Estimation
 Parametric Density Estimation
 Mixture Models  Estimation Models
 Density Estimation
Kmeans Clustering
Kmeans Clustering is good at finding equally sized clusters of data points.
Parameters
 Distance Function (Usually Euclidean)
 Number of clusters
Drawbacks
 ???Cannot cope with clusters of different sizes???
 Cannot automatically select the number of clusters (resolution)
Two algorithms
 Batch KMeans
 Online KMeans
Online KMeans is superior because it is less likely to converge to local minima and can be used for streaming data (that’s why it’s ‘online’)
Batch KMeans
is the index of the prototype
is the vector containing the assignments. Every datapoint can only be assigned to one prototype.
is our assignment vector of the datapoints.
 initialize prototypes randomly around center of mass
 loop arbitrarily
 Assign all data points to their closest prototype

choose a that minimizes the error function. –> In case of Euclidian Distance this means the center of mass
The sum of all datapoints in the cluster divided by the number of datapoints in the cluster.
 Set new
 end loop
Problem
Batch KMeans is not a Convex optimization problem. A convex optimization problem would guarantee that a local minimum is a global minimum. This means that we are note certain to converge to the optimum.
Online KMeans
 Initialize all randomly around first data point
 Select learning rate
 for in
 find closest prototype

nudge prototype a bit in the direction of the data point
Online KMeans is less likely to be stuck in a local minimum.
Robustness
Labels are not ordered
A good choice of number of clusters should be stable/repeatable. Therefore KMeans can be tried with a different number of clusters each to see which number of clusters is stable (with different initializations of course).
Validation
TODO: page 19
The following is likely wrong, better read it up in the original paper^{1}:
Algorithm:
Pairwise Clustering
Pairwise Clustering is the clustering we are used to (e.g. partitions), but instead of the original data points, only the distances are available to us. The distances are collected in a matrix . This could happen e.g. when a kernel trick was used or the measurements taken were already dissimilarity measurements.
MeanField Approximation(not very relevant)
 simulated annealing(slow)
 meanfield approximation(good and fast, robust against locoal optima)
SoftKmeans clustering (Euclidean distances) (Very Relevant)
Algorithm
 choose number of partitions
 Choose parameters:
 initial noise ()
 final noise ()
 annealing factor
 convergence criterion
 initialize prototypes
 while
 repeat EM until
 compute assignment probabilities (look up formular)
 Compute new prototypes
SelfOrganising Maps (SOM)
SelfOrganizing Maps are useful in dimensionality reduction while preserving neighborhood. At the same time it is a clustering method as opposed to LLE, which projects all data points into the lower dimensional space(see below).
Parameters
 partitions/neurons
 annealing schedule learning rate and annealing factor
 prototypes center of mass random noise
Algorithm
 for x_a in random(x)
 get closest prototype
Note: is in the map space while is in data space
 Change all prototypes using:
Example choice of
Annealing
 Decrease slowly over time
This algorithm would be similar to kmeans if one were to update only with . It would mean that only the closest prototype would be updated by the squared error. Also the exponential is not contained in kMeans.
Locally Linear Embedding
“locally linear embedding (LLE), an unsupervised learning algorithm that computes low dimensional, neighborhood preserving embeddings of high dimensional data.”^{2} In Locally Linear Embedding the idea is to split up the data into small patches and then for each patch and data point there are the weights that allow an optimal reconstruction of the data points as well as a embedding coordinates
Algorithm
Parameters
 find K nearest neighbours of
 calculate reconstruction weights
 calculate embedding coordinates
2. Cost function
is our error function. is the number of data points. are the weights
LLE is very good at preserving neighboorhoods in high dimensional data. Is Convex