Visualising Machine Learning pt.1

My last two posts have been talking creating linearly separable data.  Hopefully you found some of the features interesting – for example, the idea of creating interactivity using grab handles.  But I never really gave a purpose to what I was doing: I wanted to write some machine learning code – specifically a perceptron learning algorithm – and to test the code I needed to create some data on which it could act.  

I am close to that goal.

Based on the code from the previous post I have the following functionality:

My final task is to link the movements of the grab handles back to the colour of the data points, which is a property of the values of the response column.  That requires modification to the event handlers associated with the grab handles.

The code modifications have been highlighted:

With these modifications the interactions on the graph feed back into the formula definition for my binary response:

Now that I can create an arbitrary pattern of separable data, I can apply a machine learning algorithm that seeks to identify the boundary separating the two classes of response.  That’s the next post.

One thought on “Visualising Machine Learning pt.1”

Leave a Reply to Malcolm Cancel reply

Your email address will not be published. Required fields are marked *