Question: Write a matlab program (code) to implement the bellow question: Create a set of 2D data ( d=2, features: x=(x_1,x_2) ) Randomly create a set

Write a matlab program (code) to implement the bellow question:

Create a set of 2D data ( d=2, features: x=(x_1,x_2) ) Randomly create a set of 20 data points (N=20) such that for each point x=(x_1,x_2), the coordinates x_1,x_2 be integers. x_1,x_2 are to be limited to the [-30,+30] range and uncorrelated. Choose the line x_1+2x_2 - 1.1 = 0 as your target function, where the points on one side of the line map to y=+1 (f=x_1+2x_2-1.5>0) and the other points map to y=-1 (f=x_1+2x_2-1.5<0). Now, you have a set of 20 data points (x,y) as your separable data points. Plot the points on the 2D plane labeling them with + or - or Red and Blue. Implement and run the simple perceptron algorithm. You must write the perceptron code from scratch as opposed to using the code in software packages. Make sure to include declarations next to code lines for ease of readability.

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 Databases Questions!