Data Classification Implementing Perceptron algorithm

CA Assignment 1 Data Classification Implementing Perceptron algorithm

The purpose of this assignment is to demonstrate: (1) the understanding of the Perceptron algorithm; (2) the ability to implement the Perceptron algorithm for binary classification; (3) the ability to evaluate a classification algoirthm; (4) the ability to turn a binary classification algorithm to a multi-class classification algorithm using the 1-vs-rest approach; (4) the ability to incorporate regularisation into classification algorithm.
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.



This assignment requires you to implement the Perceptron algorithm using the Python programming language.

Don't use plagiarized sources. Get Your Custom Essay on
Data Classification Implementing Perceptron algorithm
Get a plagiarism free paper Just from $13/Page
Order Essay


No credit will be given for implementing any other types of classification algorithms or using an existing library for classification instead of implementing it by yourself. However, you are allowed to use numpy library for accessing data structures such as numpy.array. But it is not a requirement of the assignment to use numpy. You must provide a README file describing how to run your code to re-produce your results.

Assignment description

Download the file. Inside, you will find two files: and, 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).


  1. (20 marks) Explain the Perceptron algorithm for the binary classification case, providing its pseudo code.
  2. (20 marks) Implement a binary perceptron.
  3. (20 marks) Use the binary perceptron to train classifiers to discriminate between
    • class 1 and class 2,
    • class 2 and class 3, and
    • class 1 and class 3.

Report the train and test classification accuracies for each of the three classifiers after training for 20 iterations. Which pair of classes is most difficult to separate?

  1. (20 marks) Extend the binary perceptron that you implemented in part 3 above to perform multi-class classification using the 1-vs-rest approach. Report the train and test classification accuracies after training for 20 iterations.
  2. (20 marks) Add an 2 regularisation term to your multi-class classifier implemented in part 4. Set the regularisation coefficient to 0.01, 0.1, 1.0, 10.0, 100.0 and compare the train and test classification accuracies.

Submission Instructions

Submit via Canvas the following three files

  1. the source code for all your programs (do not provide ipython/jupyter/colab

notebooks, instead submit standalone code in a single .py file),

  1. a README file (plain text) describing how to compile/run your code to produce the various results required by the assignment, and
  2. a PDF file providing the answers to the questions.

It is extremely important that you provide all the files described above and not just the source code!


Master Homework
Order Now And Get A 20% Discount!
Pages (550 words)
Approximate price: -

Advantages of using our writing services

Custom Writing From Scratch

All our custom papers are written by qualified writers according to your instructions, thus evading any case of plagiarism. Our team consists of native writers from the USA, Canada, and the Uk, making it convenient for us to find the best to handle your order.

Unlimited Free Revisions

If you feel your paper didn't meet all your requirements, we won't stop till it's perfect. You're entitled to request a free revision within 7 days after we submit your paper.

Quality Writing In Any Format

If you have issues with citing sources and referencing, you need not worry. Our writers are highly knowledgeable in referencing, including APA/MLA/Havard/Chicago/Turabian and all other formatting styles.

Fast Delivery And Adherence To The Deadline

All our custom papers are delivered on time, even the most urgent. If we need more time to perfect your paper, we may contact you via email or phone regarding the deadline extension.

Originality & Security

At Master Homework, your security and privacy is our greatest concern. For this reason, we never share your personal information with third parties. We use several writing tools to ensure your paper is original and free from plagiarism.

24/7 Customer Support

Our agents are online 24 hours a day, 7 days a week, and are always ready to serve you. Feel free to contact us through email or talk to our live agents whenever you need assistance with your order.

Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

We work nonstop to see the best client experience.


Flexible Pricing

We offer pocket-friendly prices that coincide with the preferred client's deadline.


Admission help & Client-Writer Contact

Our support team is always ready to ensure vital interaction between you and the writer whenever you need to elaborate on something.


Paper Submission

We deliver our papers early within the stipulated deadlines. We are glad to help you if there should be an occurrence of any alterations required.


Customer Feedback

Your review, positive or negative, is of great concern to us and we take it very seriously. We are, consequently adjusting our policies to ensure the best customer/writer experience.