Introduction to Perceptron
Explore the perceptron model, a foundational binary linear classifier used in supervised learning. Understand how it separates classes using weighted inputs and bias through a boundary line or plane. Learn how the step activation function is applied in prediction and how the perceptron operates as a single-layer feedforward network.
We'll cover the following...
What is a perceptron?
Perceptron is a binary linear classifier used in supervised learning to classify the given input data.
Visualize a perceptron
In the case of two input data points, the perceptron model makes a line that separates the two classes.
Boundary
The boundary line that separates the two classes are:
Here:
- and are the inputs
- and are the weights
- is the bias
Prediction
The predicted value on applying the step function is given by:
=
Quiz
A perceptron model draws a line between passed and failed students including the student mark on the two tests. Suppose the equation for the line is: ()
What is the score of the student who got 2 in question 1 and 3 in question 2?
18
23
In the case of three input data points, the perceptron model would separate the two classes using a plane:
Boundary
The plane separating the data points would be:
Here,
- , , are the inputs
- , , are the weights
- is the bias
Prediction
The predicted value on applying the step function is given by:
=
In the case of n-dimensional data points, hyperdimensional plane is the separating boundary.
Boundary
The hyperdimensional plane would be:
Here,
- , , , … are the inputs
- , , , … are the weights
- is the bias
Prediction
The predicted value on applying the step function is given by:
=
📝 Note: The process of calculating the perceptron output and then applying the step function is called “feedforward operation”. As the perceptron is a single-layered neural network, a perceptron is a single-layer feedforward operation. The step function is called an “activation function” because it activates the perceptron output.
Quiz
If a perceptron model predicts whether a student is promoted or not promoted in the next class on the basis of marks in 5 exams and the perceptron equation for creating dimensional hyperplane is:
What is the score of the student who received 10 in exam 1, 30 in exam 2, 40 in exam 3, 10 in exam 4, and 10 in exam 5?
Note: The bias is 5.
200
270
275
300
Takeaway
Perceptron can be used to solve a two-class classification problem.
The boundary that separates the two classes is given by:
This is known as a single-layer feedforward operation.
The prediction is given by:
=
The step function is the activation function.