Perceptron algorithm
The perceptron algorithm is an iterative linear-classification procedure that updates model parameters when labeled examples are misclassified.
Grokking Machine Learning, Second Edition
An iterative training procedure that updates a perceptron's weights and bias using labeled examples.
- How it is used
- Trains binary classifiers that predict categories such as sentiment, spam, recommendations, and health states.
- How deep it goes
- Develops repeated updates geometrically and algebraically, then implements score, prediction, error, and training functions.
- Examples
- Uses happy and sad word-count sentences, COVID-19 symptoms, and AND, OR, and XOR gate datasets.
- What you can do after
- Build it from scratch by iterating weight and bias updates, monitoring error, and interpreting a resulting decision line.
Read how Grokking Machine Learning, Second Edition explains perceptron algorithm →
Grokking Machine Learning
A training algorithm that adjusts a perceptron's parameters to improve its predictions on labeled examples.
- How it is used
- Trains binary classifiers for tasks such as sentiment analysis, spam detection, recommendation, image recognition, and health-care prediction.
- How deep it goes
- Explains geometric and algebraic updates, error measurement, stochastic training, and implementation, while stopping short of multilayer networks.
- Examples
- Uses happy and sad alien sentences, a patient diagnosis dataset, classifier plots, and AND, OR, and XOR gate exercises.
- What you can do after
- Builds a perceptron from scratch in Python, evaluates its error, and applies a Turi Create classification workflow.
Read how Grokking Machine Learning explains perceptron algorithm →
What to know first
- absolute errorAbsolute error is an error measure based on the nonnegative absolute difference between an observed value and its prediction, optionally aggregated across observations.
- batch gradient descentBatch gradient descent is an optimization method that computes each parameter update using the entire training dataset.
- inner productAn inner product is a scalar-valued operation on two vectors that generalizes the dot product, which for real coordinate vectors is the sum of products of corresponding components.
Related concepts
- stochastic gradient descentuses · Stochastic gradient descent is an iterative optimization method that updates parameters using gradients estimated from individual examples or randomly sampled mini-batches.
- machine learningkind of · Machine learning is a field of computational methods in which systems learn patterns or relationships from data to make predictions, decisions, or other outputs.
- algorithmkind of · An algorithm is a finite, precisely specified procedure for performing a computation, transforming inputs into outputs, or solving a problem.
- batch gradient descentalternative to · Batch gradient descent is an optimization method that computes each parameter update using the entire training dataset.
- learning rateuses · A learning rate is a numerical step-size parameter that controls the magnitude of successive updates to model parameters or estimates during iterative learning or optimization.
- perceptron error functionmeasures · A perceptron loss function that assigns zero to correctly classified instances and the absolute score to misclassified instances.
Questions about perceptron algorithm
What is perceptron algorithm?
The perceptron algorithm is an iterative linear-classification procedure that updates model parameters when labeled examples are misclassified.
Which Manning books explain perceptron algorithm?
Grokking Machine Learning, Second Edition and Grokking Machine Learning.
What should I know before learning perceptron algorithm?
Manning books that teach perceptron algorithm usually introduce absolute error, batch gradient descent, COVID-19 and inner product first.
What is the difference between perceptron algorithm and batch gradient descent?
The perceptron algorithm is an iterative linear-classification procedure that updates model parameters when labeled examples are misclassified. Batch gradient descent is an optimization method that computes each parameter update using the entire training dataset.
What is perceptron algorithm a kind of?
Perceptron algorithm is a kind of machine learning. Machine learning is a field of computational methods in which systems learn patterns or relationships from data to make predictions, decisions, or other outputs.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

