Learn how to build powerful machine learning models with the Amazon service

Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp



After using Azure ML last week, received multiple emails to post a tutorial on Amazon machine learning. Fortunately, some of my meetings were postponed and I had time to write this.

Here is some more good news for you, I present you a tool that will make it even simpler. It will just take all the guesswork out you had to do with Azure ML when choosing the model and splits. Obviously, I'm talking about the Amazon ML Tool. Unfortunately, this time you won't get a trial pack, Instead, you will have to create your account by providing your credit card information.. But nevertheless, the tool is free to use and your credit card information is used only in case you break the free tier.

In this article, I have demonstrated a step by step tutorial to create a machine learning model with Amazons. I have also shared a video tutorial at the end of this article. Let's make our first machine learning model with the Amazon ML tool.


What's New in Amazon Machine Learning?

Amazon is known for an improved user experience, timely innovations and developments.

Makes only 4 days, Amazon added a function to Random data division and cross validation. You can now train and evaluate machine learning models based on the division of random input data. This will help you avoid overfitting and produce more accurate evaluations..

Last month, Amazon enabled real-time predictions feature that allows users to preview the prediction in real time before creating the application. This function does not require code. It's' push a button’ to start the show.

Read also: Amazon re: Invent 2015 (Machine Learning Reinvented)

Price drop

Basically, Amazon charges you for 2 services:

Data analysis and modeling fees – It depends on the size of the input data, number of variables, transformation types and number of calculation hours. For this, You will be charged $ 0.42 per hour.

Prediction rates – It can be further divided into Batch predictions Y Real-time predictions. Batch predictions are when your application gets many predictions at once. In real-time predictions, you can request predictions for immediate use through web applications, mobile or desktop. Batch prediction costs $ 0.10 by 1000 predictions. Real-time prediction costs $ 0.0001 by prediction.

Machine learning model with the Amazon service

Let's get to work now!

1. Once you log in, you will find this as the main page (shown below). Now, select the Machine Learning models to go to the first page of the ML tool.

ml1-9293048 2. The next step is enter a data set. In case you don't have any dataset ready, you can use the one suggested in the "banking.csv" dialog. Select S3 as the option (aml-sample-data / banking.csv). Once the dataset has been successfully loaded, a dialog box will appear “successful validation”.
ml2-7574253screen-shot-2015-12-05-at-8-36-52-pm-83326044. Press "Continue" to go to the next screen. Now you will find all the variables and a sample of data. One thing to make sure of is the destination tag. This is your dependent variable. In our current example, The objective is “Y”. Therefore, you will see a check mark in the Destination column. screen-shot-2015-12-05-at-11-54-26-pm-1024x140-2735665

5. Now press' continue’ and click on 'Review'. In the final tab, you will find a summary of all entries. Below is a sample:


6. Finally, press "Finish" and you're done.

Checking the model results

To check the results, go to Control Panel.


On the board, can find all kinds of created objects. Then, some key checks you can perform are included:

1. Check the data type : Clicking on the ID of Banking.csv, you will find a panel to navigate through the data. screen-shot-2015-12-06-at-12-01-35-am-27733942. Now, click Target Display. You will find the distribution of each column. For instance, the distribution of the target variable is shown below (Y): screen-shot-2015-12-06-at-12-03-02-am-3526151

3. Check performance metrics : To check performance metrics, click assessment type ID. Below is the board you get:screen-shot-2015-12-06-at-12-04-57-am-1094655

4. As you can see, our model has an AUC of 0,94. What's more, this tool gives you the option to adjust the scoring threshold. This is a very interesting simulation to witness the exchange between false positive and true positive. Here is an instance:

screen-shot-2015-12-06-at-12-07-12-am-6482702In this graph, can move the threshold score which gives you% correct and% error. the gray line is for the distribution of 0 Y black line is the distribution of 1s. Shaded portions represent type 1 Y type errors 2 depending on which side of the cut line the area falls. It also has a toolkit called advanced metrics. These are other levers that can be adjusted to simulate the same graph. Here is a snapshot of this toolkit:


Additional resource: You may also be interested in this tutorial of 53 minutes taught in AWS re: invent 2015:

Final notes

The Amazon ML tool is a really good tool for visualizing data and results. The time it takes for the tool is slightly higher when compared to H2O or other similar toolkits. But nevertheless, the whole process is exceptionally easy to execute.

In this article, I have demonstrated a step by step process to create a machine learning model using the Amazon ML service. As you have seen, it is a fairly simple and 'no code' process. Therefore, people who find encryption intimidating should use these services frequently.

Do you find helpful this article ? Share with us your experience with the Amazon Machine Learning tool.

If you like what you have just read and want to continue learning about analytics, subscribe to our emails, Follow us on twitter or like ours page the Facebook.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.