Question: (1) Use Python to generate a 2D (x; E R2) linearly separable data set with 50 data points. The data set should have approximately
(1) Use Python to generate a 2D (x; E R2) linearly separable data set with 50 data points. The data set should have approximately half positive and half negative instances. Create a scatter plot to visualize the data set. Split the data set into training set (60%) and test set (40%). (2) Use Python (not sklearn package) to create the Batch Perceptron training algorithm and use the training 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 the test set in a.(1) to test the trained model in a.(2) and calculate the accuracy (error rate) of the trained model. (4) Use Python (not sklearn package) to create the sequential Perceptron training algorithm and use the training data set in a. (1) to train a Perceptron model. Plot the weights vs iterations curve when the training process converges. Create a plot that shows the training instances and the resulting decision boundary. (5) Use the test set in a.(1) to test the trained model in a. (4) and calculate the accuracy (error rate) of the trained model. (6) Show how you select learning rate during the training process of a. (2) or a.(4) and demonstrate how the choice of the learning rate is affecting the convergence of the training process. b. Nonlinearly separable case: (1) Use Python to generate a 2D not linearly separable data set with 50 data points. The data set should have approximately half positive and half negative instances. 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
3.43 Rating (150 Votes )
There are 3 Steps involved in it
Ill provide you with a stepbystep guide on how to complete each of the tasks youve described To acco... View full answer
Get step-by-step solutions from verified subject matter experts
