Python代写|Adaptive Intelligence Assignment 1

这是一个英国的python Matlab自适应智能程序代写案例

The aim of this report will be to summarise the work done on competitive learning in
Lab 4. You will be working with a modified version of dataset called EMNIST[1, 2]. It is
similar to the MNIST dataset with images on a grid of 28×28 pixels but with handwritten
letters instead of digits. For simplicity, the dataset has been restricted to the capital
letters A to J (i.e 10 classes) with 500 samples of each class. The format of the dataset
is the same as in the MNIST dataset, rows correspond to input patterns and columns
to attributes (or features). The provided .mat file contains an array called train images
which contains the data needed for training. Keep in mind that the EMNIST dataset is
not normalised. Please note that for educational purposes only, labels are provided. In
general, this is not the case for problems where we use unsupervised learning approaches.

Therefore your replies should not make use the labels as part of the arguments.

Your task is to implement the standard competitive learning algorithm on a one layer
network and use it to cluster the set of hand-written letters. You may choose the number
of output units such that you can capture all 10 characters and tune the network such
that it will learn quickly and result in as few dead units as possible. To do this, you
will have to implement a method for detecting dead units among the prototypes without
visualising the weights. Please note: do not forget to normalise the weight vector and
the data at the beginning of the process.

In your report you should address the following points but are also encouraged to expand
upon these where possible:

1. Explain what is meant by unsupervised learning. What are the key ingre
dients and the objective?

2. Give a brief description of the competitive learning algorithm, including
the update rule for the network weights. Is it batch or online and what is
the difference between the two? Why is it important to normalise data and weight
vectors for competitive learning to work? What could happen otherwise? Give a
mathematical argument.

3. Give a description of the technique(s) you used to improve the training
of the network and what you achieved by using them. Provide a measure
ment of improvement (i.e. How many dead units you have on average. Perform
statistics over at least 10 different initial conditions). Include a description of your
method for identifying dead units without the need of visualising the prototypes.

4. Plot the running average of the reconstruction error as a function of
time. Change the number of output neurons and include the running
average for this on the same plot. From the lectures, the reconstruction error
for an individual sample xµ is

where k is the index of the winning neuron for that pattern and j runs over
the input neurons. An exponential running average can be updated using E¯t =
E¯t−1(1 − α) + αEt, where E¯t is the running average, α the smoothing factor and
Et the error calculated at iteration t. The first step is a boundary case and you
should set E¯0 = E0 (or t = 1 for MATLAB). When has your network sufficiently
learned from the data? How has changing the number of output neurons affected
the error? Such a curve might be more informative on semi-log or log-log axes.

5. Plot the prototypes (weight vectors) and a discuss on what they rep
resent. How many prototypes did your network find? You should reshape the
prototypes so that they are each the same shape as the input data (i.e 28 × 28)