A comparison of self-coded machine learning algorithms applied to the MNIST digit dataset