Dynamics 365 Supply Chain Management Demand Forecasting ML Overview

IMG_0232

Demand forecasting in Dynamics 365 Supply Chain Management (SCM) provides an approach to integrate time series forecasting on the Azure Machine Learning (ML) platform with the core functionality of the supply chain product. This will be the first of a series of posts that will drill into the ML aspect of the capability.

  • ML Overview – An overview of Azure ML Studio and the interface from SCM to Azure ML (this post).
  • R Script Details – A dive into the R script that does the heavy lifting.
  • Azure Auto ML Comparison – Use an external data set to show the differences between the SCM out of the box functionality and what Azure Auto ML does.
  • Results Discussion – An explanation of the results of the experiment from the previous post.
  • Customization Opportunities – A discussion on the various ways that customization can be done given the background from the previous posts.

Azure Machine Learning Studio confusion

Before we go further, I’ll try to clear up the confusion about Azure Machine Learning Studio as there are two versions that sit on different technology bases. Azure Machine Learning Studio (Classic) was released in 2015 and is the original version. In more recent years, the Azure team has introduced a new Azure Machine Learning (AML) Studio aligned with the current technology platform. While both versions provide an option for a drag and drop experience targeted the low code / no code ML, the new version is a much broader service that aspires to be a data science platform (What is Azure Machine Learning studio? – Azure Machine Learning | Microsoft Docs). The Classic version is being deprecated and you won’t be able to create new resources in it as of December 1, 2021. You can continue to use resources into 2024.

As of today (10/2021), the SCM functionality uses Azure ML Studio (Classic). The product team has announced a migration to the new Azure ML Studio in 10.0.23 (Demand forecasting overview – Supply Chain Management | Dynamics 365 | Microsoft Docs). This blog post is based on the current Classic implementation, but the product team has informed me that the new version will be very similar from an ML perspective. I will update the posts as needed as more information comes out.

The basics of the ML solution

As described in Demand forecasting overview – Supply Chain Management | Dynamics 365 | Microsoft Docs, you can “download” the Azure ML experiment form the Cortana Analytics Gallery. Once you find the experiment in the gallery, you can open experiment in your private workspace of Azure ML Studio (Classic). There’s an option for a free workspace that will look like the following.

Microsoft Machine Learning Studio (classic) 
Dynamics Ax7 - demand forecasting 
Enter Data Manually 
SAMPLE DATA 
Execute R Script 
GENERATE FORECAST 
split Data 
Select Columns in Dataset 
Web service output 
Mini Map 
RUN HSTORY 
David Froslie-Free-Worksp... • 
Web service input 
Enter Data Manually 
PARAMETERS 
Select Columns in Dataset 
Web service output 
PUBLISH TO 
SERVICE 
In draft 
Draft saved at 6:43:12 AM 
Search experiment items 
Saved Datasets 
My Datasets 
manual_data 
Samples 
Adult Census Income „ 
Airport Codes Dataset 
Automobile price dat... 
Bike Rental LICI dataset 
Bill Gates RGB Image 
Blood donation data 
Book Reviews from 
Breast cancer data 
Breast Cancer Features 
Breast Cancer Info 
CRM Appetency Labe... 
CRM Churn Labels Sh... 
CRM Dataset Shared 
CRM upselling Labels... 
Energy Efficiency Reg... 
Flight Delays Data 
Flight on-time perfor... 
Forest fires data 
fraudTemplateUtil.zip 
German Credit Card 
IMDB Movie Titles 
Iris Two Class Data 
MNIST Test 10k 28x2... 
MNIST Train 60k 280... 
NEW

The graphical view of the experiment makes it quite easy to follow. Dynamics 365 interfaces with the experiment through a web service input. You can also run the experiment interactively in the studio. The green check marks indicate which blocks I have ran interactively. The Enter Data Manually SAMPLE DATA block provides a very simple dataset in the proper format and the Enter Data Manually PARAMETERS block enables you to set up the ML parameters that are normally done in the SCM product experience.

Input data structure

After interactively running the manual blocks, you can look at their output by clicking on the output node and selecting Visualize. Doing this for the SAMPLE DATA block provides good insight on the data structure needed for the experiment. As shown below, there are three columns:

  • GranularityAttribute – SCM can send many unique time series to Azure ML based on the company and dimension information you specify. Each unique time series is a ‘grain’ to the ML code. In this case, there is only a single grain in the dataset. Typically, there would be several grains with data.
  • DateKey – The experiment uses simple indexes for the data key so it doesn’t care if the time series is daily, weekly, quarterly, etc. The SCM module will convert to and from the actual dates and the indexes.
  • TransactionQty – This is the historical data that will be used for forecasting. It represents the quantity of the product represented by the GranularityAttribute for the particular DateKey.

Dynamics Ax7 - demand forecasting > Enter Data Manually > dataset 
rows 
24 
','lew as 
columns 
3 
GranularityAttribute 
DateKey 
usmf010D AlocOD00010 
1332 
usmf010D AlocOD00010 
1333 
usmfOlOD_AlocOD00010 
1334 
usmf010D_AlocOD00010 
1335 
usmf010D AlocOD00010 
1336 
usmf010D AlocOD00010 
1337 
usmfOlOD_AlocODOOOlO 
1338 
usmfOlOD_AlocODOOOlO 
1339 
usmf010D AlocOD00010 
1340 
usmf010D AlocOD00010 
1341 
nnn 
TransactionQty 
330.5 
331 
325 
316 
316 
316.8 
308 
308 
310.9 
324

You can also change either block by selecting and viewing the slide out. The following shows the parameters, which are simply an ordered list of values.

In draft 
Draft saved at AM 
p 
input 
Properties Project 
Enter Data Manually 
DataFormat 
CSV 
a HasHeader 
Data 
1 horizon, seasonality, 
2 
12, 12, 1356, ALL, 95 
Enter Data Manually 
PARAMETERS 
lumns in Dataset 
START TIME 
END TIME 
ELAPSED TIME 
STATUS CODE 
STATUS DETAILS 
View output log 
10/1/2021 9:49:56 AM 
10/1/2021 AM 
Finished 
None 
Web Service Parameters 
Parameters

Output data structure

The Execute R Script block is where all the action happens and is the most interesting part of the experiment, but I’ll save that for later posts. The R script can output one dataset in Classic. After running the R block and selecting Visualize on the output node, you will see this visual:

Dynamics Ax7 demand forecasting 》 Execute R Script 》 Result Dataset 
VleW as 
1 3 
7 
Type 
2 
囗 囗 O 
usmfDIDD AlocOD00010 
囗 囗 O 
usmfDIDD AlocOD00010 
囗 口 O 
usmfDIDD_AlocOD00010 
囗 口 D 
usmfDIDD_AlocOD00010 
口 口 O 
usmfÜIÜD AlocOD00010 
囗 囗 O 
usmfDIDD AlocOD00010 
usmfDIDD AlocOD00010 
囗 口 O 
usmf010D_AlocOD00010 
囗 口 O 
usmfÜIÜD AlocOD00010 
囗 囗 O 
usmfDIDD AlocOD00010 
usmfDIDD_AlocDD0001D 
usmfDIDD_AlocDD0001D 
囗 口 O 
usmf010D AlocOD00010 
GranularityAttribute 
1367 
1366 
1365 
1364 
1363 
1362 
1361 
1360 
1359 
1358 
1357 
1356 
DateKey TransactlonQty Slgma 
327 , 466667 80.687566 
327 , 466667 80.687566 
327 , 466667 8p687566 
327 , 466667 80 , 687566 
327 · 466667 8p687566 
327 · 466667 80.687566 
327 · 466667 80.687566 
327 , 466667 8p687566 
327 , 466667 8p687566 
327 · 466667 8p687566 
327.466667 8p687566 
327.466667 8p687566 
35 02423 
Er 乛 0毛e 乛 centage ForecastModelName 
ARIMA

Because only one output can be created from an R module in Azure ML Studio (Classic), the script needs to combine multiple pieces of information in that single dataset. It does this by having two Types (first column). Type 1 is the forecasted data. Type 2 provides an error percentage and the model used for each grain. I’ll discuss this information in more detail in the next post on the R module.

The Split Data and Select Columns blocks are used to split that single data output into two datasets with appropriate columns. After these blocks, one dataset will contain the time series forecasts (Type 1) and the other dataset will contain the error percentages and model information (Type 2).

split Data 
Select Columns in Dataset 
Select Columns in Dataset

That completes post 1 about SCM demand forecasting machine learning. Next up is a deep dive into the R module.

Picture details:  9/20/2020, Canon PowerShot G3 X, f/5, 1/100 s, ISO-200

1 thought on “Dynamics 365 Supply Chain Management Demand Forecasting ML Overview”

Comments are closed.