'Anyone who has never made a mistake has never tried anything new.' Albert Einstein
I have been interested in Machine Learning for a while. As I was already doing a course which involved pure mathematics I decided to wait until I had covered matrices.
Below are links to the main sections of code used for my Machine Learning Agent and a mock version to test the agent.
Matrix Github
Macine Learning Agent Github
XOR Machine Learning Agent
Once I had a good understanding of matrices and matrix multiplication I got to work on creating my own Matrix library. In my repo it's the Matrices script. This handles all the calculations needed for my machine learning agent. The agent then keeps an array of these to build the different layers of the neural network. The agent itself has functions to work through the layers using the inputs given so it can give a prediction. If also passed the expected answer the agent can train based on this by using back propagation to back through the layers of the neural network tweaking each connection.
This was my first complete test of what I made. The agent is passed each point and asked to tell me if it lies within the true areas(green) or false areas(red). I then tell it if it was wrong or right and it trains based on that information. This is called the XOR challenge. If it can correctly work out the areas that are true and false then the agent is working. It should be capable of working this out with one layer between input and output that's 4 nodes in size but it can take a long time to do this and the results are rough at best. With 2 layers at size 4 it can learn this much faster and with more precision. This shows the agent's intelligence grows greatly with more layers.
For my next challenge I plan to take on hand written number identification. As I know there is a large database of handwritten number images along with the expected answer that I can use to train my agent on.