Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Adaptive Intelligence

Assignment 1

2022

1  Unsupervised learning

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[12]. 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.

1.1  Competitive learning

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

E = !(x − Wkj)2 ,                                           (1)

j

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 t  =  t − 1(1 − α) + αEt , where 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 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)

6. The correlation matrix of the prototypes can be defined as

Cij  = ! WikWjk                                                               (2)

k

Plot the correlation matrix of the prototypes and discuss it. How can you use this information to find similarities between the prototypes?

2  Report

This is an individually written report of a scientific standard, i.e. in a journal-paper like format and style. It is recommended that you use the web to find relevant journal papers and mimic their.  .structure(eg   https://www .ieee .org/conferences/publishing/ templates .html).  Results should be clearly presented and justified.  Figures should have captions and legends. Your report should NOT exceed 5 pages (excluding Ap- pendix and Cover Page).  It is important that your are concise and carefully consider the figures and discussion you are presenting.  Additional pages will not be assessed. Two-column format is recommended, the minimum font size is 11pt and margins should be reasonable.  Kindly note that the readability and clarity of your document plays a major role in the assessment.

In the report you should include:

1. A response to all points requested by the assignment (including graphs and expla- nations). It is suggested to adopt a similar numbering scheme to make clear that you cave responded all questions.

2. An Appendix with snippets of your code referring to the algorithm implementa- tions, with proper comments/explanations.

3. A proper description of how your results can be reproduced, see also “Important Note” .

Important Note: Please make sure that your results are reproducible. Together with the assignment, please upload your code well commented and with sufficient information (e.g. Readme file) so that we can easily test how you produced the results. If your results are not reproducible by your code (or you have not provided sufficient information on how to run your code in order to reproduce the figures), the assessment will not receive full points.

3  Suggested language

The recommended programming language is Python or Matlab. However, on your own responsibility, you may submit the project in any language you wish, but you should agree it beforehand with the course instructor.

4  Marking

Assignments will be marked with the following breakdown: results and discussions con- tribute up to 60%, scientific presentation and code documentation up to 20% and origi- nality in modelling the task for up to 20%.

A mark greater than 39% indicates an understanding of the basic concepts covered in this course. A mark greater than 69% indicates a deep knowledge of the concepts covered in this course, with evidence of independent thinking or engagement beyond the level of material directly covered during lectures/laboratory sessions.

To maximise your mark, make sure you explain your model and that results are supported by appropriate evidence (e.g. plots with captions, scientific arguments). Figures should be combined wherever appropriate to show a clear message.  Any interesting additions you may wish to employ should be highlighted and well explained.

5  Submission

The deadline for submitting the report and the corresponding code is Wednesday 22nd March 2022, 15:00. Please make sure you upload your report as a pdf (single file only) in the “Assignment 1 - Report” slot.  Your code should be uploaded on the “Assignment 1 - Code” slot and in case of multiple files please zip them and upload them as one zipped file. Please do not include the data set in the zip.

We remind that the results described in the report should be reproducible by your code (qualitatively). A dedicated appendix section on how to use your code to reproduce your results or a readme file along with your code is advisable.

6  Plagiarism, and Collusion

You are permitted to use Matlab or Python code developed for the lab as a basis for the code you produce for this assignment but with appropriate acknowledgment.  You may discuss this assignment with other students, but the work you submit must be your own.  Do not share any code or text you write with other students.  Credit will not be given to material that is copied (either unchanged or minimally modified) from published sources, including web sites.  Any sources of information that you use should be cited

fully. Please refer to the guidance on “Collaborative work, plagiarism and collusion” in the Undergraduate or MSc Handbook.

 

References

[1]  “The  EMNIST  dataset.”https://www .nist .gov/itl/products-and- services/

emnist-dataset.

[2] G. Cohen,  S. Afshar, J. Tapson, and A. van Schaik,  “EMNIST: an extension of

MNIST                                     .”  Rtohandwrittenlettersetrieved from:   http://arxiv .org/abs/1702 . 05373, (2017).