Perceptron Trick

The perceptron trick helps us to find the best possible line that separates the two classes. Let's learn how?

We know how to predict the output from the given perceptron. Perceptron output can draw a boundary between the two classes.

The boundary is not always accurate when model output is calculated the very first time.

The best possible fit function

We want the line to create the boundary that separates the two classes.

The following illustration helps you visualize this:

Quiz

Q

What did you observe in the illustration above? Are we moving the point closer to the line or the line closer to the misclassified point?

A)

line closer to the misclassified point

B)

misclassified point closer to the line

📝 We are moving the line downwards if the star is misclassified and moving the line upwards if the square is misclassified.

How to find the best possible fit?

Recall the perception equation for making a boundary line:

$ w_1x_1 + w_2x_2 + b = 0$

The prediction is given by:

y^\hat{y} = { 1 if w1x1+w2x2+...wnxn+bw_1x_1 + w_2x_2 +... w_nx_n + b ...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy