$29
Objective
In this individual project, you are required to get familiar with several single-layer linear neural networks.
Requirements
2.1 Tasks
(20 points) Design and implement a Perceptron binary classi er.
(20 points) Design and implement an Adaline binary classi er.
(20 points) Design and implement a Stochastic Gradient Descent (SGD) binary classi er.
(20 points) Write program to test the di erent classi ers.
(1 point) Your program should be called main.py.
(2 points) It should have two arguments: (i) classi er name, which can be `perceptron', `adaline', and `sgd', and (ii) data le path. You can have other arguments depending on the design of your program.
(2 points) It should have proper error checking functions (e.g., make sure the classi er name is a valid one).
(15 points) It calls the di erent classi ers to train models, make predictions, and report prediction accuracies/errors.
(18 points) Write a report proj1_report.pdf to analyze the predictive power and the running time of di erent classi ers.
(2 points) For each classi er, you should report the accuracy of the prediction.
(3 points) For each classi er, please report the errors or costs in each iteration and plot gures for the errors/costs for all the iterations.
(5 points) Each classi er needs to be tested using two datasets: (1) Iris (by treating one class as positive class and the other two classes as negative class) and (2) another dataset. You need to nd your second dataset from UCI machine learning repository (https://archive.ics.uci. edu/ml/index.php). This dataset needs to be bigger than the Iris dataset (more samples and more features).
(5 points) Properly analyze the classi ers' behavior. For example, how do your classi ers converge? what is the e ect of feature scaling to your classi ers.
(3 points) Analysis on any other aspects that are not mentioned above and that you think impor-tant.
(2 points) Write a readme le proj1_readme.txt with the commands to run your code. An example of your readme le is as follows.
python hw1.py perceptron iris.data
python hw1.py adaline iris.data
python hw1.py sgd iris.data
python hw1.py perceptron <dataset2
python hw1.py adaline <dataset2
python hw1.py sgd <dataset2
1
(20 points) (only for CS 519 students) Implement a multiclass classi er using One-vs-Rest strategy and the SGD binary classi er. Properly test the classi er using Iris data set and another dataset with more than two class labels. Your second dataset should be from UCI machine learning repository (https: //archive.ics.uci.edu/ml/index.php). Include a proper analysis for this multiclass classi er in the report. Include the commands to run this classi er in the readme le.
2.2 Other requirements
Your Python code should be written for Python version 3.5.2 or higher.
Please properly organize your Python code (e.g., create proper classes, modules).
Submission instructions
Create a github repository for all your project code.
In your github repository, create a project folder proj1.
Put all your les (Python code, readme le, report, etc.) in your project folder. Submit the link to your github repository folder through Canvas.
Grading criteria
The score allocation has already been put beside the questions.
Please make sure that you test your code thoroughly by considering all possible test cases. Your code may be tested using more datasets.
5 points will be deducted if submitted les (including les types, le names, etc.) do not follow the instructions.
The total points for CS 519 students are more than 100. Your grades will be scaled to the range of [0,100].
2