Learn to Build Powerful Machine Learning Models with Amazon Service
After using Azure ML last week, I received multiple emails to publish a tutorial on Amazon’s ML. Thankfully, some of my meetings got postponed and I got time to write this.
Here is some more good news for you, I present you a tool which will make it even more simpler. It will just remove all the guess work you had to do with Azure ML in choosing model and splits. Obviously, I am talking about the Amazon ML tool. Unfortunately, this time you won’t get a trial pack but have to create your account giving up your credit card information. However, the tool is free to use and your credit card information is used only in case you breach the free tier.
In this article, I’ve demonstrated a step by step tutorial to build machine learning model with Amazon. I’ve also shared a video tutorial at the end of this article. Let’s make our first machine learning model with Amazon ML tool.
What’s New in Amazon Machine Learning ?
Amazon is known for enhanced user experience, timely innovation and developments.
Just 4 days back, Amazon added a feature for Random Data Splitting and Cross Validation. Now you can train and evaluate machine learning models based on random input data split. This will help you to avoid overfitting and produce more accurate evaluations.
Last Month, Amazon enabled real time predictions feature which let’s users to preview real time prediction before creating the application. This features requires no code. It’s ‘push a button’ to get started feature.
Basically, Amazon charges you for 2 services:
Data Analysis and Model Building Fees – It depends size of input data, number of variables, types of transformation and number of computation hours. For this, you’ll be charged $0.42 per hour.
Prediction Fees – It can further be divided into Batch Predictions and Real Time Predictions. Batch Predictions are when your application obtain many predictions at once. In real time predictions, you can request predictions for immediate use via web, mobile or desktop applications. Batch Prediction costs $0.10 per 1000 predictions. Real Time Prediction costs $0.0001 per prediction.
Machine Learning Model using Amazon Service
Let’s get to work now!
1. Once you sign in, You’ll find this as the main page (shown below). Now, select Machine Learning models to move to the first page of ML tool.
5. Now press ‘continue’ and click ‘Review’. In the final tab, you’ll find a summary of all inputs. Below is a sample:
6. Finally, you press “Finish” and you are done.
Checking Model Results
To check the results, go to Dashboard.
In the dashboard, you can find all type of objects created. Here are some key checks you can do:
1. Check the data type : On clicking the ID of Banking.csv, you will find a dashboard to browse through the data. 2. Now, Click Target Visualization. You’ll find the distribution of each column. For instance, following is the distribution of the target variable (y):
4. As you can see, our model has a AUC of 0.94 . Also, this tool gives you an option to adjust score threshold. This is a very interesting simulation to witness the trade off between false positive and true positive. Here is an instance :
In this chart, you can move the threshold score which gives you % correct and % error. The grey line is for distribution of 0s and black line is the distribution of 1s. The shaded portions represent type 1 and type 2 errors depending on which side of the cut off line the area falls. You also have a tool kit which is called the advanced metrics. These are other levers which can be adjusted to simulate the same graph. Here is a snapshot of this tool kit :
Additional Resource: You may also be interested in this 53mins tutorial delivered at AWS re:invent 2015:
Amazon ML tool is a really good tool for visualisation of data and results. The time which the tool take is slightly on the higher side when I compare it with H2O or other similar tool kits. However, the entire process is exceptionally simple to execute.
In this article, I’ve demonstrated a step by step process to build a machine learning model using Amazon ML service. As you have seen, it’s quite simple and ‘codeless’ process. So, people who find coding to be intimidating should use such services often.
Did you find this article helpful ? Share with us your experience with Amazon Machine Learning tool.