O'Reilly logo

Machine Learning for OpenCV by Michael Beyeler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the perceptron

In the 1950s, American psychologist and artificial intelligence researcher Frank Rosenblatt invented an algorithm that would automatically learn the optimal weight coefficients w0 and w1 needed to perform an accurate binary classification: the perceptron learning rule.

Rosenblatt's original perceptron algorithm can be summed up as follows:

  1. Initialize the weights to zero or some small random numbers.
  2. For each training sample si, perform the following steps:
    1. Compute the predicted target value ŷi.
    2. Compare ŷi to the ground truth yi, and update the weights accordingly:
      • If the two are the same (correct prediction), skip ahead.
      • If the two are different (wrong prediction), push the weight coefficients w0 and w1 towards ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required