Azure AI Machine Learning – Regression Model

Machine Learning is a technique that creates a model to draw conclusions from a dataset and predict unknown values. In Azure AI, there are two machine learning models: 

  1. Supervised learning 
  2. Un-supervised learning. 


The Supervised machine learning model is further divided into two techniques – Regression and Classification the Regression technique predicts a numeric value while the Classification model predicts classes or categories. In a Regression model, we can predict the number of sales (forecast/demand) based on historical sales while in the Classification model, we might predict the likelihood of an event happening. One example would be showing the risk of a patient being diabetic based on their health information such as blood pressure, glucose levels and other diagnostic data. 

The unsupervised machine learning model only consists of one technique: Clustering Technique. Using the clustering technique, entities are grouped together based on their similarities and features. One example of this would be to group flowers with of the same structure and features belonging to a certain species or cluster. 

In Azure, machine learning is implemented using a tool called Azure Machine Learning Designer (AMLD). In AMLD, a sample dataset is extracted, imported or fetched from the data sources. This data is then transformed (cleaned, normalized) and trained using the dataset. The dataset is split for validation and training, meaning a part of the data (almost 50-70%) from the same dataset is trained in a machine learning model, and the remaining is used for training to evaluate the data for better performance, and to make sure that the given data is consistent and effective 

In this blog, we will discuss how to implement the Regression technique in Azure Machine Learning Designer. Below is a template outlining the process of regression model.  

1. Create Machine Learning resource on azure – This creates a machine learning studio. You can launch Machine learning studio after this resource is created. 


2. Create Compute targets 

  • Create compute instance 


  • Create compute clusters 



3. Create a pipeline – Pipelines are used to train a machine learning model using Azure Machine Learning Designer 



4. Add Datasets to the designer from sample datasets. 

  • Add data transformations – This step addresses the issues in the data by cleaning up, excluding, or normalizing the data 
  • Clean Missing Data 
  • Normalize Data 


5. Run the pipeline – Click on the submit button 


6. Add training modules 

  • Add split data 


  • Add Linear Regression – Use this algorithm to train your regression model 
  • Add Train Model 
  • Add Score Model 

The model looks like this: 


7. Run the training pipeline – Click submit and see the results in the Outputs+logs tab -> Scored dataset -> Preview Data icon. A new column called Score labels has been created. 

8. Evaluating a Regression model 

9. Add an Evaluate Model to the canvas and click Submit. Wait for the experiment to be completed and review the results under Outputs +logs tab -> under Data outputs -> Evaluation results -> Preview Data icon. This will display the performance metrics of the model 

10. Create an inference pipeline – A second pipeline should be created to perform data transformation for the new data, this data then uses the trained model to infer the new output values. 

11. Deploy the predictive service – Click on Deploy. A deployed service creates an endpoint which contains the REST endpoint and a primary/authentication key. The combination of these two enables you to connect to the REST service. 

12. Test the service – Test the service under the Notebooks module of the machine learning studio.  


Machine learning models use different techniques to model and train your data. The trained data can then be used to predict results of the new data. You can also see the performance metrics of each trained model to see how accurate the results are. Generally, the more data you train the model, the more accurate the results are. 

Leave a Reply

Your email address will not be published. Required fields are marked *