Download - Kohonen self organizing maps

Transcript
Page 1: Kohonen self organizing maps

KOHONEN SELF ORGANIZING MAPS

Page 2: Kohonen self organizing maps

History of kohonen som

Developed in 1982 by Tuevo Kohonen, a professor emeritus of the Academy of Finland

Professor Kohonen worked on auto-associative memory during the 70s and 80s and in 1982 he presented his self-organizing map algorithm

Page 3: Kohonen self organizing maps

History of Kohonen SOMs

His idea on Kohonen SOM only became famous much later in 1988 when he presented a paper on “The Neural Phonetic Typewriter” on IEEE computer that his work became widely known

Since then many excellent papers and books have been made on SOM

Page 4: Kohonen self organizing maps

What are self organizing maps?

•Are aptly named “Self-Organizing” because no supervision is required.

•SOMs learn on their own through unsupervised competitive learning.

•They attempt to map their weights to conform to the given input data.

Page 5: Kohonen self organizing maps

What are self organizing maps?

• Thus SOMs are neural networks that employ unsupervised learning methods, mapping their weights to conform to the given input data with a goal of representing multidimensional data in an easier and understandable form for the human eye. (pragmatic value of representing complex data)

Page 6: Kohonen self organizing maps

What are self organizing maps?

•Training a SOM requires no target vector. A SOM learns to classify the training data without any external supervision.

Page 7: Kohonen self organizing maps

The Architecture• Made up of an input nodes and computational

nodes.• Each computational node is connected to each

input node to form a lattice.

Page 8: Kohonen self organizing maps

The Architecture

•There are no interconnections among the computational nodes.

•The number of input nodes is determined by the dimensions of the input vector.

Page 9: Kohonen self organizing maps

Representing Data•Weight vectors are of the same dimension as the input vectors. If the training data consists of vectors, V,  of n dimensions:

V1, V2, V3...Vn

•Then each node will contain a corresponding weight vector W, of n dimensions:

W1, W2, W3...Wn

Page 10: Kohonen self organizing maps

A sample SOM

Page 11: Kohonen self organizing maps

Terms used in SOMs

•vector quantization - This is a data compression technique. SOMs provide a way of representing multidimensional data in a much lower dimensional space; typically one or two dimensions

Page 12: Kohonen self organizing maps

Terms used in SOMs…

•Neighbourhood

•Output space

• Input space

Page 13: Kohonen self organizing maps

EXPLANATION: How Kohonen SOMs work

The SOM Algorithm

•The Self-Organizing Map algorithm can be broken up into 6 steps

• 1). Each node's weights are initialized.

•2). A vector is chosen at random from the set of training data and presented to the network.

Page 14: Kohonen self organizing maps

EXPLANATION: The SOM Algorithm…

3). Every node in the network is examined to calculate which ones' weights are most like the input vector. The winning node is commonly known as the Best Matching

Unit (BMU).

Page 15: Kohonen self organizing maps

EXPLANATION: The SOM Algorithm…

• 4). The radius of the neighbourhood of the BMU is calculated. This value starts large. Typically it is set to be the radius of the network, diminishing each time-step.

Page 16: Kohonen self organizing maps

EXPLANATION: The SOM Algorithm…

• 5). Any nodes found within the radius of the BMU, calculated in 4), are adjusted to make them more like the input vector (Equation 3a, 3b). The closer a node is to the BMU, the more its' weights are altered

• 6). Repeat 2) for N iterations.

Page 17: Kohonen self organizing maps

Computation of scores•The Function for calculating the score inclusion for an output node is known as :

•Thus to calculate the score for inclusion with output node i:

Page 18: Kohonen self organizing maps

Computation of scores…

•To calculate the score for inclusion with output node j:

= 0.141

Page 19: Kohonen self organizing maps

The Winning Node• Node j becomes the winning node since it

has the lowest score.

• This implies that its weight vector values are similar to the input values of the presented instance.

• i.e. The value of node j is closest to the input vector.

• As a result, the weight vectors associated with the winning node are adjusted so as to reward the node for winning the instance.

Page 20: Kohonen self organizing maps

Concluding the tests

• Both of these are decreased linearly over the span of several iterations and terminates after instance classifications do not vary from one iteration to the next

• Finally the clusters formed by the training or test data are analysed in order to determine what has been discovered

Page 21: Kohonen self organizing maps

NEIGHBORHOOD ADJUSMENTS

• After adjusting the weights of the winning node, the neighbourhood nodes also have their weights adjusted using the same formula

• A neighbourhood is typified by a square grid with the centre of the grid containing the winning node.

• The size of the neighbourhood as well as the learning rate r is specified when training begins

Page 22: Kohonen self organizing maps

ILLUSTRATION: A Color Classifier• Problem: Group and represent the primary

colors and their corresponding shades on a two dimensional plane.

Page 23: Kohonen self organizing maps

A Color classifier: Sample Data

•The colors are represented in their RGB values to form 3-dimensional vectors.

Page 24: Kohonen self organizing maps

A Color classifier: Node Weighting

•Each node is characterized by:

•Data of the same dimensions as the sample vectors

•An X, Y position

Page 25: Kohonen self organizing maps

A Color Classifier: The algorithm

Initialize MapRadius = dLearning rate = r For 1 to N iterations

Randomly select a sample Get best matching unit Scale neighbors Adjust d, r appropriately End for

Page 26: Kohonen self organizing maps

A Color classifier: The Layout

Page 27: Kohonen self organizing maps

A Color classifier: Getting a winner•Go through all the weight vectors and calculate the Euclidean distance from each weight to the chosen sample vector

•Assume the RGB values are represented by the values 0 – 6 depending on their intensity.

• i.e. Red = (6, 0, 0); Green = (0, 6, 0); Blue = (0, 0, 6)

Page 28: Kohonen self organizing maps

A Color classifier: Getting a winner…

• If we have colour green as the sample input instance, a probable node representing the colour light green (3,6,3) will be closer to green than red.

•         Light green = Sqrt((3-0)^2+(6-6)^2+(3-0)^2) = 4.24         Red           = Sqrt((6-0)^2+(0-6)^2+(0-0)^2) =  8.49

Page 29: Kohonen self organizing maps

A COLOR CLASSIFIER: DETERMINING THE NEIGHBORHOOD

• Since a node has an X – Y position, it’s neighbors can be easily determined based on their radial distance from the BMU coordinates.

Page 30: Kohonen self organizing maps

A COLOR CLASSIFIER: DETERMINING THE NEIGHBORHOOD…

• The area of the neighbourhood shrinks over time with each iteration.

Page 31: Kohonen self organizing maps

A Color classifier: Learning

•Every node within the BMU's neighbourhood (including the BMU) has its weight vector adjusted according to a pre-determined equation

•The learning rate is decayed over time.

Page 32: Kohonen self organizing maps

A Color classifier: Learning

•The effect of learning  should be proportional to the distance a node is from the BMU.

•A Gaussian function can be used to achieve this, whereby the closest neighbors are adjusted the most to be more like the input vector.

Page 33: Kohonen self organizing maps

A Color classifier: Sample output

• Classification on a 40 x 40 SOM

Page 34: Kohonen self organizing maps

Current Applications

• WEBSOM: Organization of a Massive Document Collection

Page 35: Kohonen self organizing maps

Current Applications…

•Classifying World Poverty

Page 36: Kohonen self organizing maps

Current Applications…

•Phonetic Typewriter