How do you teach Artificial Intelligence (AI) to work with Azure Machine Learning?

Would you require more information on this topic?

Please request a free consultation appointment with us.

How do you teach Artificial Intelligence (AI) to work with Azure Machine Learning?

Machine learning is currently on everyone's lips across all industries. The detection of errors in production and manufacturing processes as well as the predictive planning of maintenance measures are only some of the drivers that drive the application of analytical methods or the use of artificial intelligence "AI". The application of data science methods, such as machine learning, says a lot about the past behavior of machines, processes and people. It also enables predictions to be made about predictive analytics methods.

How does this complicated-sounding machine learning work at all and how can one test the applicability to one's own Question?

We therefore want to approach this complex environment step by step by creating a demo and training data and point out the expected added values. We use special cloud services from Azure (Microsoft Azure is a cloud computing platform from Microsoft) to illustrate the possibilities.

Preparation of test and training data

In order to build confidence in analytical methods, it makes sense to create test and training data that can be tested in the first step. Various approaches are conceivable for this. In our example we prepare the data in Microsoft Excel. Here we generate measured values that show us a production error if a certain temperature value is exceeded or not reached, as well as a range within specific limits. Specifically, if the process temperature exceeds 16 degrees, falls below -16 degrees and in the temperature range from -5 degrees to +5 degrees, an error occurs in the manufacturing quality. 

Temperaturabhängiges Fehlverhalten eines Motors


Figure 1: Temperature-dependent malfunction of a Motor

To simulate this, we create an Excel file with two columns. One column for the recording of the temperature values, later determined by a corresponding sensor. For demo purposes, we generate random temperature values from -100 degrees to +100 degrees. This is done with the help of a simple Excel formula (=RANDBETWEEN (-100;99) + RANDBETWEEN (0;999)/1000). In a second column we describe the state of a motor unit. Here we record whether there is a fault at a corresponding temperature or not. We also describe the malfunction with a simple formula that considers the described threshold values and temperature ranges.

vorbereitete Testdaten

Figure 2: Prepared test and training data

We then convert this formula-based evaluation into an ASCII-based file (CSV format) and thus remove all formulas and only retain the values and the statement as to whether there is an engine error. This step completes the preparation of the training and test data.

Using the Azure Machine Learning Studio

Azure Machine Learning Studio is a powerful cloud-based predictive analysis service that enables you to quickly create predictive models and deploy them as analysis solutions.

The first step in working with the Learning Studio is to create a so-called Azure Machine Learning Studio Workspace. A workspace makes it possible to create and manage machine learning experiments and predictive web services. Several workspaces can be created, which then contain the experiments, datasets, trained prediction models, web services, etc. As the creator of a workspace, we can invite other users to share the workspace and thus provide the created solutions for predictive analysis.

Provision of the evaluation logic as web service

We used the Azure Machine Learning Studio in the step before to develop a predictive analysis model. We then make the logic available to the Azure Machine Learning Studio Web Service. The predictive web service can then easily be used by user-defined applications or BI tools such as PowerBI, Excel, Flow or similar.

Step-by-step procedure for creating the predictive web service

But let's take it one step at a time. Here is a short "step by step" guide to get the required result and make a prediction of the failure of an engine depending on the temperature.

First we need an Azure Account. This can be set up as a demo account on the -Portal, free of charge. Afterwards we can Login via - A dashboard will open from which all Azure services can be viewed.

On the left side we can then create a [Create Ressource]. Here we select [Machine Learning Studio Workspace].

Arbeitsbereich in Azure Machine Learning anlegen

Figure 3: Create workspace

For the creation of the workspace, some information such as a storage account must be provided. In this configuration view, all data can be entered directly or missing areas can be created. For a quick start, it is recommended that the suggested Settings be accepted. After everything is configured, the workspace is created. The progress can be viewed under [Notifications] and the newly created resource can be opened directly on completion.

Azure Machine Learning Workspace

Figure 4: Creating and opening a Machine Learning Workspace

After opening the resource you can start the [Machine Learning Studio] (see picture gallery).

Figure 5-8: Picture Gallery on how to start the Machine Learning Studio

After the data sets are available in Azure, we create a new [Experiment]. For this, click on [New] and create an empty experiment [Blank Experiment]. Then the workspace should appear as shown in the following figure.

Experiment created in Azure

Figure 9: Experiment created

Now we can add function blocks to our experiment using the drag and drop functions. The available blocks can be selected from a treeview on the left side and are simply "dragged" into the workspace.

Populating the experiment

Figure 10: Populating the experiment

First, we add our test data to the experiment. In the next step we divide the data into two areas using [Split Data]. One half of the data is used to train the model. The other datasets are used to test the trained model. The percentage divided into test and training data can be set as a rule of thumb with 70 percent training data and 30 percent test data. The next step is to select a suitable algorithm. In our case we select the [Two-Class Boosted Decision Tree].

What is a Decision Tree?
Learning decision trees uses a decision tree (as a predictive model) to go from observations about an element (represented in the branches) to conclusions about the target value of the element (represented in the sheets). It is one of the predictive modeling approaches for statistics, data mining and machine learning.

We then connect the data points at the edges of the function blocks with each other: We connect the output of the DataSet with our module to divide it into training and test data. Next, we add the training data (output of the split-data module) and our chosen algorithm to our training model. Then we have to tell the training model which column to "train".

Specify column for training evaluation

Figure 11: Specify column for training evaluation

After successful selection, the trained model and the test data derived from the dataset are evaluated in the function module [Score Model] for reliability of the prediction. In order to do this, the model must first be calculated. This is done by right-clicking on the Score Model block and executing the [Run selected] function.

Calculate model

Figure 12: Calculate model

Shortly later, the calculation result is available and can be viewed with [Scored dataset / Visualize].

Comparison of training data with forecast data

Figure 13: Comparison of training data with forecast data [scored labels]

Provision of the result

The result can then also be made available via WebService.

Deploying WebService

Figure 14: Deploying WebService

To do this, click on the [Set Up WebService] button. Thereupon a possibility for the input of temperature values via web interface is created. The work area is automatically extended by a [Predicitve experiment] tab. The automatically added function block [WebService input] can now be seen here as the input variable for the function block [Score Model].

Web Service Output

Figure 15: Web Service Output

Furthermore, based on the model data, the failure of the engine is predicted. The data can then be queried using the [WebService output]. To make this procedure available, a calculation run using [Run] is necessary and then the [Deploy WebService] must be called.

Deploy WebService

Figure 16: Deploy WebService

Once this has been successfully completed, temperature values can be entered to query whether a motor failure will occur on the basis of this trained model.

Calling the WebService

Figure 17: Calling the WebService Input via test page [automatically generated]

Via the automatically generated test page, the input data can be entered via [Test] - in this case the temperature. The response of the Web Service Output can then be viewed in the lower area.

Uncritical temperature value

Figure 18: Uncritical temperature value

For the demo query, 10 degrees were entered here. Then you can read the value "FALSE" in the third column. This means that no failure is predicted at this temperature.

In the next example a temperature value of 4 degrees is selected. You can now read a "TRUE" in the result, which indicates a failure.

kritischer temperaturwert ki

Figure 19: Critical temperature value


It is very easy to take your first steps in machine learning with the Azure Machine Learning Studio. It has been shown how to teach and make artificial intelligence elements available by simply configuring available function blocks without in-depth programming knowledge. The convenient provision of WebServices also facilitates the integration of forecast results into the applications. In further articles we will focus on different algorithms, as this article is only intended to give a first impression. The areas of monitored and unmonitored learning will also be covered in further articles.

We are happy to take up suggestions for topics and articles and deal with them.

Feature Image source:

No available comments yet

Do you have any questions?

About Us

SWMS Systemtechnik Ingenieurgesellschaft mbH is a consulting and technology company in the field of software conception and development and virtual product development.

Working Hours

Monday - Friday : 8:00 - 16:00
Weekends / Holidays : Closed


If you have any questions , feel free to contact us at any time by mail ( or during business hours by telephone in Oldenburg at +49 (0) 441 960 21 0.


Have a look around our different categories for interesting, inspiring articles


Would you like to receive interesting subject-related content by e-mail? Then subscribe to our newsletter now.
Copyright © 1996 SWMS Systemtechnik Ingenieurgesellschaft mbH. | Impressum, Datenschutz, AGBs