My first experience with Microsoft Azure Machine Learning Studio

Shanika Perera
6 min readMar 8, 2019

Hello there! Hope everyone’s had a great week. As you guys know, I’ve been studying Machine Learning for the research project that I’m working on and also as a module at my university as well. Here’s to the first experience I had with Microsoft Azure Machine Learning 😍 I will walk you through what is MS Azure to building an ML experiment by yourself.

Photo by Markus Winkler on Unsplash

What is Azure Machine Learning?

Azure machine learning is a cloud-based service used to build, test and deploy predictive analytics solutions based on your data. Machine Learning Studio(MLS) is a drag-and-drop tool that can be used to build ML models, publish them as web services that can easily be consumed by custom apps like MS Excel.

Azure MLS is an interactive workspace where you can easily get in use to develop ML modules. You can drag-and-drop datasets, analysis modules into an interactive canvas connect them to form an experiment. You can edit the experiment any time you want, save it and run it again. If you want, you can convert your training experiment to a predictive experiment and then publish it as a web service so that your model can be accessed by others.

Components of an experiment

An experiment consists of a dataset in which provides data to analytical modules which you connect together to construct a predictive analysis model. A valid experiment must have these characteristics.

  • The experiment has at least one dataset and one module.
  • Datasets may be connected only to modules.
  • Modules can be connected to either datasets or other modules.
  • All input ports for modules must have some connection to the data flow.
  • All required parameters for each module must be set.

Getting started with the Machine Learning implementation

In general, ML implementation involves the following steps.

  1. Preparation of dataset samples.
  2. Analysis of dataset samples.
  3. Training the system with dataset samples.
  4. Evaluating the resultant dataset outcome to measure the accuracy of the solution.

Let’s get to the fun part 😉

You need to have an account at Microsoft Azure Machine Learning Studio to continue this. If you do not, create an account now. It’s free.

This is what your working canvas should look like.

Your previously done experiments will be shown here.

Click on the +New button at the bottom left corner to start a new experiment. Click on the Blank Experiment.

You can rename your experiment as you like.

To add the dataset to the working canvas, type “Iris Two Class Data” on the left side “Search experiment items” search box.

Drag the dataset into your Experiment window as shown below.

Right-click on the Iris Two Class Data module on the Experiment window and then, click “Visualize” as shown below.

You will be able to see the dataset that we have selected.

Now, type “split” in the search box and drag the “Split Data” module into your Experiment window.

Now, connect the “Iris Two Class Data” module with the “Split Data” module by simply dragging.

then set the “Fraction of rows in the first output dataset” value to “0.75”.This way, we’ll use 75 percent of the data to train the model, and hold back 25 percent for testing. You can see each of the divided datasets by clicking on the “visualize” buttons 1 and 2 separately. As this dataset contains 100 rows, 75 will be in the 1st dataset and the remaining 25 will be on the 2nd dataset.

Now to add the Machine Learning algorithm, search “Multiclass Neural Network” in the search box and drag it into your experiment. Leave the properties as it is. There are ML algorithms available in Azure MLS.

Now, type “train model” in the search box and drag the “Train Model” module into the Experiment window.

Connect the “Multiclass Neural Network” module and “Split Data” module with the “Train Model” module by simply dragging, as shown below. Make sure to connect the first output port of the Split data with the Train model.

The error shown in the Train Model is because we have not told our training model to train on which feature(column) of our dataset. This is the predictive feature of our dataset. So, click on “Launch column selector”.

Choose the “Class” column, as that’s what our prediction is going to be. We are going to predict the class with the given dataset.

Now click on “Run” at the bottom, to run the experiment.

If there are no errors, the experiment should look like this after running.

To test the accuracy of our machine learning model, we will now test the trained data with the remaining split data. Type the “score model” in the search box and drag the “Score Model” module in the Experiment window and connect the “Train Model” module and “Split Data” module to the “Score Model”.

Now let’s run the experiment again to see the expected results.

Click on the “Visualize” button of the “Score Model”.

As you can see, the actual predictive column(Scored Labels) is matched identically with the original “Class” column. This proves that our machine learning model is quite accurate.

You can further evaluate your scored results to observe the statistics of the developed model. type “eval” in the search box and drag the “Evaluate Model” module into the Experiment window, then connect the “Score Model” module with the “Evaluate Model” module.

Now click the “Run” button. Then, right-click the “Evaluate Model” module and click “Visualize”.

Now you know how to build a small predictive analysis ML model using Azure Machine Learning Studio. I will post more on these predictive models in my upcoming posts. Keep in touch for more cool stuff!

References —

--

--

Shanika Perera

Infrastructure Security Engineer | WSO2 | CKA | AWS SysOps Administrator | HashiCorp Certified Terraform Associate