Question: 4 . ( 2 0 pts ) Let s use an artificial data set to understand the PLA. A . Generate a linearly separable 2

4.(20 pts) Lets use an artificial data set to understand the PLA.
A. Generate a linearly separable 2D data set of size 30. Plot the examples (points blue/red based on their
classification) and the target function f . Be sure to add labels to the axes of the plot.
B. Run the PLA on the dataset in (A). Report the number of updates before the algorithm converges. Plot
the final hypothesis g and f in the same figure. Describe what you see and if the result g is close to f .
C. Repeat A-B with another randomly generated data set of size 30. Compare your results with B.
D. Run PLA on a non-linearly separable dataset with 10 points. Again, do steps similar to A-B. Decide on
an error to use. Plot the error at each iteration. Run for 30 iterations. What error metric did you use and
why? Given the plot how would you modify the algorithm to work for non-linearly separable datasets?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!