Share via


Tutorial: How to Train a Neural Network with Azure Machine Learning

I recently stumbled upon James McCaffrey’s session on Neural Networks from Build 2014 and I thought it was cool how he had implemented the back-propagation algorithm in C# for training neural networks. If you haven’t seen James’ session yet I will strongly recommend you to do so. It’s a great session that presents the idea of neural networks really well and demonstrates how you can implement and train your own using .NET and Visual Studio.

Immediately after watching the session I opened up Visual Studio to try and do what James had just done. Rather than the Iris data set, I used the Wisconsin Breast Cancer data set and after just a bit of trial and error I had trained successfully my own neural network with an accuracy of about 97-98%. I was pretty thrilled! I refactored some of James’ original code so if you want to try and replicate the example from his Build session, you can go ahead and take a look at the refactored solution, which I uploaded to GitHub. You should be able to just clone the repository and build the code yourself. Try it out:

After completing the example with the Breast Cancer data set by coding it myself, I thought of using Azure Machine Learning to do the same job. Azure ML is a new service in Azure and it offers an incredibly powerful set of tools for machine learning. It’s still in preview but the product is already so mature that you can go ahead and start working with it today. Since I already had my Breast Cancer data set, I wanted to see how fast I could train the same network using Azure ML instead of custom code in C#. And, oh boy, it was easy – and fast! I have recorded a tutorial of how to set up the experiment in Azure ML Studio so if you want to do the same, you can see how it’s done. Check out the video here:

Resources

Here are a list of resources I refer to in the video:

As always: Have fun playing around with Azure ML! If you have any questions please don’t hesitate to write me a comment below or send me an email. I will be happy to help! :-)

Comments