up

### Problem Set 3 (30.4 - 14.5.07)

In this problem set we will explore soft competitive learning of reference vectors for map formation. To do so you may reuse and modify your solutions from the last problem set.

Since there will be no problem set in the next week, both exercises are mandatory this time. Since ex. 2 is a generalization of ex. 1 you can work at both exercises in parallel or even start with 2.

#### Exercise 1

1. Implement the soft competitive learning algorithm that was presented in the second lecture for the fixed topology of a 1-dim. chain (of arbitrary length).
2. Test your implementation on a two dimensional data set. Plot the resulting vertices and edges on top of the data set (you can use the Matplotlib tricks if you want). Create an animation of the convergence.
3. Implement a way to increase the number of reference vectors in a converged topology. Then reapply the learning algorithm and plot how the mapping of the chain on the data changes.

#### Exercise 2

1. Implement a representation for any given connection topology of a set of reference vectors. The initialization data should consist only of the connection matrix. Use an object oriented approach (e.g. define an topology-object) and treat exercise 1 as a special case (i.e. derive a corresponding class).
Define a function that returns the topological distance of two reference vectors (the function may use stored data that has been computed during initialization).
2. Implement the soft competitive learning algorithm as in exercise 1, now using a given topology from a.
3. Create a two dimensional 4 by 4 mesh (no wrap-around). Use this for soft competitive learning on a two dimensional Gaussian data set. Visualize the resulting mesh on the data cloud (the drawing of the mesh can be included in the topology object).