Visualizes 500 points and uses the perceptrons to guess correctly if the point lies above or below the dividing line. The dividing line is represented by equation y = mx + c. So, this code works for any generic line provided by this equation.
Green points indicate that the point was guessed correctly. Whereas Red points indicate incorrect guess. The bold black line denotes the dividing line against which linear classification is performed. Whereas the yellow one denotes the classification that the algorithm has guessed so far. It basically shows the algorithm's progress.
We slowly converge to a function which guesses all the points correctly using simple gradient descent.