interactiveaudiolab / course-deep-learning

Teaching materials for the deep learning course.
15 stars 2 forks source link

Weirdness in the perceptron learner #2

Closed interactiveaudiolab closed 2 years ago

interactiveaudiolab commented 2 years ago

Hmm...so when a point is near to the plotted decision surface...but on the wrong side of the line... the perceptron doesn't update the decision surface. Is there a problem with the decision surface plotting or is there a problem with the perceptron code? Not sure. Have a look at this.

Screen Shot 2022-01-27 at 2 43 42 PM
oreillyp commented 2 years ago

It's looking like a plotting issue - the weights and decision boundary are shown after the update, so what we'd be looking for in the above example is a difference between the weights at steps 4 and 5, not 5 and 6. When I run the perceptron with "verbose=True", it looks like the actual weight updates are being performed correctly.

I agree that this is very unclear, and so I've modified the plotting code to plot the weights, data, and decision boundary before the weight update takes place. Hopefully, the plots now illustrate the perceptron learning process more clearly.