COMP 337/COMP 527 – 2020 – CA Assignment 1
Data Classification Implementing Perceptron algorithm
algorithm作业代写 Assignment Number 1 (of 2)Weighting 12%Assignment Circulated 28th February 2020Deadline 20th March 2020, 15:00 ···
Assessment Information algorithm作业代写
Assignment Number | 1 (of 2) |
Weighting | 12% |
Assignment Circulated | 28th February 2020 |
Deadline | 20th March 2020, 15:00 UK Time (UTC) |
Submission Mode | Electronic via Departmental submission system |
Learning outcome assessed | (1) A critical awareness of current problems and research issues in data mining. (3) The ability to consistently apply knowledge concerning current data mining research issues in an original manner and produce work which is at the forefront of current developments in the sub-discipline of
data mining. |
Purpose of assessment
Marking criteria |
This assignment assesses the understanding of the Percep- tron algorithm by implementing a binary Perceptron for text clustering.
Marks for each question are indicated under the correspond- ing question. |
Submission necessary in order
to satisfy Module requirements? |
No |
Late Submission Penalty | Standard UoL Policy. |
Objectives algorithm作业代写
This assignment requires you to implement the Perceptron algorithm using the Python program- ming language.
2 Text Classification using Binary Perceptron Algorithm
Download the CA1data.zip file from the COMP 337 / COMP 527 Blackboard and uncompress it. Inside, you will find two files: train.data and test.data, corresponding respectively to the train and test data to be used in this assignment. Each line in the file represents a different train/test instance. The first four values (separated by commas) are feature values for four features. The last element is the class label (class-1, class-2 or class-3).
Questions/Tasks
- Explainthe Perceptron algorithm for the binary classification case, providing its pseudo (20 marks)
- Provethat for a linearly separable dataset, perceptron algorithm will (10 marks)
- Implementa binary (20 marks)
- Usethe binary perceptron to train classifiers to discriminate between (a) class 1 and class 2,
(b) class 2 and class 3 and (c) class 1 and class 3. Report the train and test classification accuracies for each of the three classifiers after 20 iterations. Which pair of classes is most difficult to separate? (20 marks)
AND
- For the classifier (a) implemented in part (3) above, which feature is the most discrimina- tive? (5 marks)
- Extend the binary perceptron that you implemented in part (2) above to perform multi-class classificationusing the 1-vs-rest Report the train and test classification accuracies for each of the three classes after training for 20 iterations. (15 marks),
- Add an l2regularisation term to your multi-class classifier implemented in question (5). Set the regularisation coefficient to 0.01, 0.1, 1.0, 10.0, 100.0 and compare the train and test classification accuracy for each of the three classes. (10 marks)
3 Deadline and Submission Instructions algorithm作业代写
- Submit
- thesource code for all your programs (do not provide ipython/jupyter/colab note- books, instead submit standalone code in a single .py file),
- a README file (plain text) describing how to compile/run your code to produce the various results required by the assignment, and
- aPDF file providing the answers to the
Compress all of the above files into a single zip file and specify the filename as studentid.tgz (replace “studentid” by your departmental student id). It is extremely important that you provide all the files described above and not just the source code! File types other than zip will not be accepted by the submission system. Every year there is a significant number of submissions without a student id or a name. Obviously, if you do not write name or student id then it is not possible to assign marks to you!
- Submission is via the departmental submission system accessible from (Submission link will be shortly provided)