Question: 1. The Perceptron algorithm a. Separable case: (1) Use Python to generate a 2D (x ER2) linear separable data set with 50 positive instances and
1. The Perceptron algorithm a. Separable case: (1) Use Python to generate a 2D (x ER2) linear separable data set with 50 positive instances and 50 negative instances and create a scatter plot to visualize the data set. (2) Use Python (not sklearn package) to create the Batch Perceptron training algorithm and use the synthetic data set in a (1) to train a Perceptron model. Plot the error function curve when the training process converges. Create a plot that shows the training instances and the learnt decision boundary. (3) Use Python (not sklearn package) to create the sequential Perceptron training algorithm and use the synthetic data set in a.(1) to train a Perceptron model. Plot the error function curve when the training process converges. Create a plot that shows the training instances and the resulting decision boundary. (4) Show how you select learning rate during the training process of a.(2) or a.(3) and demonstrate how the choice of the learning rate is affecting the convergence of the training process. b. Nonseparable case: (1) Use Python to generate a 2D not linearly separable data set with 50 positive instances and 50 negative instances and create a scatter plot to visualize the data set. (2) Modify the training algorithm you developed in a.(2) to have a training algorithm that works on a nonseparable data set. Use the synthetic data set in b.(1) to test your algorithm. Show the error function curve. Plot the decision boundary on the scatter plot of the data set. 1. The Perceptron algorithm a. Separable case: (1) Use Python to generate a 2D (x ER2) linear separable data set with 50 positive instances and 50 negative instances and create a scatter plot to visualize the data set. (2) Use Python (not sklearn package) to create the Batch Perceptron training algorithm and use the synthetic data set in a (1) to train a Perceptron model. Plot the error function curve when the training process converges. Create a plot that shows the training instances and the learnt decision boundary. (3) Use Python (not sklearn package) to create the sequential Perceptron training algorithm and use the synthetic data set in a.(1) to train a Perceptron model. Plot the error function curve when the training process converges. Create a plot that shows the training instances and the resulting decision boundary. (4) Show how you select learning rate during the training process of a.(2) or a.(3) and demonstrate how the choice of the learning rate is affecting the convergence of the training process. b. Nonseparable case: (1) Use Python to generate a 2D not linearly separable data set with 50 positive instances and 50 negative instances and create a scatter plot to visualize the data set. (2) Modify the training algorithm you developed in a.(2) to have a training algorithm that works on a nonseparable data set. Use the synthetic data set in b.(1) to test your algorithm. Show the error function curve. Plot the decision boundary on the scatter plot of the data set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
