$24.99
Student certification:
Team member 1:
I have contributed by doing the following:________________________________________________________ Signed: ________________________________________________ (you can sign/scan or use e-signature)
Team member 2:
I have contributed by doing the following:________________________________________________________ Signed: ________________________________________________ (you can sign/scan or use e-signature)
Team member 3:
I have contributed by doing the following:________________________________________________________
Signed: ________________________________________________ (you can sign/scan or use e-signature)
Pr.2.1 Perceptron-based classifier (10 pts)
In this assignment please use the datasets from Project 1. In the language of your preference (Python,
Java, Matlab, C++), implement a perceptron-based classifier that will iterate until the total error is:
Dataset Stopping criterion
A Epsilon ε<10-5
B Epsilon ε<40
C Epsilon ε<700
To do this, you need to introduce a stopping criterion. You should also introduce a limit on the maximum number of iterations (let that be ni=5,000). Please normalize the datasets first. Initialize your neuron using random values between (-0.5, 0.5).
Please use:
a) Hard unipolar activation function
b) Soft unipolar activation function
For activation function in a) perform the following steps for each of the datasets.
1. Choose 75% of the data for training and the rest for testing. Train and test your neuron. Plot the data and decision line for training and testing data (separately). Note and report the final Total Error (TE) of training. Create a confusion matrix for the testing dataset, as well as rates (true
positive, false positive, etc), and compare those to the one from Project 1. (2 pts)
2. Choose 25% of the data for training and the rest for testing. Train and test your neuron. Plot the data and decision line for training and testing data (separately). Note and report the final Total Error (TE) of training. Create a confusion matrix for the testing dataset, as well as rates (true
positive, false positive, etc), and compare it to the one from Project 1. (2 pts)
3. Compare training TE between steps 1 & 2 above. For testing datasets, compare accuracy, confusion matrices, and rates between steps 1 & 2 above. Answer the following questions: (1 pt)
a. Are error rates different, and if so, why?
b. What is the effect of different data sets and the effect of different training/testing distributions of TEs on the accuracy, confusion matrices, and rates (true positive, false positive, etc).?
c. When would you go with step 1 and when with step 2 from above?
d. Comment and discuss.
Repeat steps 1. through 3. for activation function in b).
Important: The data sets list the data points for both types of patterns (“small” car and “big” car).
Extra credit question: How would you choose which data points to use for training, and which for
Pr. 2.2 Soft vs. hard activation function (5 pts)
Compare and discuss results when hard unipolar activation was used, vs. when soft unipolar activation function was used. You should include plots and be specific (provide quantitative comparisons when comparing). (3 pts)
Comment on each training/testing distribution and each data set. (2 pt)
------------------------------------------------------------------
Note:
2. Project deliverable should be two files:
a. Written report with all the plots and answers to all of the questions above, in pdf format. b. A zip file containing:
i. Training/testing data sets as decided in Pr. 2.1 steps 1 & 2 ii. Source code. Python code can be in a Python notebook file (.ipynb) or a Python file (.py).
3. Submit your deliverables (Canvas). Please name files as
a. GroupName_Project2.pdf and
b. GroupName_Project2.zip