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.
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.
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.
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:
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).
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.