Notes for Monday, April 23
- The linear classifier is a vector with one value per input parameter. In this case the input parameters are the x and y values. Therefore the inner product of a data vector (ie a point in the SVG) and the classifier vector determines the prediction of the classifier. This value is 0 when the point is orthogonal to the classifier, which is the linear "decision boundary".
- I'm using the same trick as the Tensorflow page to lay the SVG over a Canvas element. To set the canvas I check the predicted value of each pixel and set its color accordingly. The version I used in class was quite slow -- not only was it using a tanh operation for each pixel, it was generating a color object. This wasn't really necessary, so I created a cached version of the colors.
- The perceptron algorithm moves the classifier vector towards the direction of a positive misclassified instance and away from the direction of a negative misclassified instance. The learning rate parameter determines how far in that direction we move.