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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started