Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Need Predictive Model Solution

Karthik_7694
8 - Asteroid

Hi,

 

I have a dataset for which time series predictive modelling forecasting needs to be done using Alteryx. The data set has more columns i.e multivariate data by default in alteryx arima and ets are available but it is not suited for multivariate dataset. So how to solve this multivariate time series forecasting algorithms in alteryx.

 

Any suggestion or guidance will be useful. We can also use python plugin component in the workflow but whether there are any other alternate feasible solution to solve this.

 

 

5 REPLIES 5
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Karthik_7694 ,

 

could you provide a bit more detail? In general, if there is a relation between the columns (e.g. the value of a "target column" is influenced by the values of the other columns, a regression model could be a solution. ARIMA and ETS both work on historic data of the value, you want to "predict" (sometimes using an additional input value). To make a decision for the right model, more information would be helpful.

 

Best,

 

Roland 

Karthik_7694
8 - Asteroid

Hi Roland,

 

My Objective is to build a forecasting model for a supply chain dataset where I have multiple columns(Attributes).

 

There are three columns which needs to be considered for building the model.

 

1) Product Id [1000 Unique Product Id are there]

2) Date Column [Monthly intervals for each product Id]

3) Demand [Target Column for which the forecasting needs to be done].

 

So I have to build a time series model for each product id with their expected monthly forecast for next 2 years. So i need a feasible approach for solving this.

 

Thanks,

Karthik.

jimmke7
7 - Meteor

How does your time series dataset exactly look like? only the following 3 columns?:
1. Date (monhtly?)
2. historic demand
3. Product ID?

 

Maybe its possible to generate some sample data so we can understand what data is available. Because if it's only these 3 columns that you have available, I don't think you are dealing with a multivariate time series...

Let me know and maybe I can point you in the right direction for a solution. I have been busy the last 15 weeks researching designing and realizing time series forecasting models, also for a supply chain organization.

, Jimmy

Karthik_7694
8 - Asteroid

Hi jimmke7,

Sample dataset and its description is given below.

 

Date column has monthly equal intervals of time period.

Demand is the target column which needs to be forecasted.

 

Forecasting should be done for all product ids for next 2 years. so the dataset needs to be grouped by product id's and then the model should forecast the demand for all the products with 2 years estimated prediction.

 

My actual data looks similar to this below table data.

 

Product IdProduct DescriptionDate [Monthly]Demand
P0001Electronics1/9/201910
P0001Electronics1/10/20195
P0001Electronics1/11/20196
P0001Electronics1/12/20198
P0001Electronics1/1/202010
P0002Consumer Electronics1/9/20196
P0002Consumer Electronics1/10/20198
P0002Consumer Electronics1/11/201910
P0002Consumer Electronics1/12/20197
P0003Cameras1/9/20198
P0003Cameras1/10/20196

 

Thanks,

Karthik.

jimmke7
7 - Meteor

Hi @Karthik_7694,

to my knowledge you are not dealing with a time series data set as of the current situation. according to the definition of a time series data set: Time series is a sequence of observations recorded at regular time intervals. Which is not the case in the dataset you present because each date occurs 1000 times. To really get a time series data set you would have to split the dataset into 1000 parts, 1 for each productID which leaves you with 1000 univariate time series datasets. Which also means you would have to forecast 1000 times. I get that this is not ideal and therefor maybe you should question yourself if its necessary to forecast on the productID level.

 

There is never 1 perfect way to forecast so i only will give my suggestion on how you can go further, don't take this as the optimal way to forecast:

Suggestion 1:
Consider if you think the forecast on productID level would be accurate. You can determine this by analyzing the time sereis dataset using time series data analysis. I used the following article to perform time series analysis: Time Series Analysis in Python - A Comprehensive Guide with Examples - ML+ (machinelearningplus.com) (Many of the plots that are made in this article using python can also be realized using the TS plot tool in alteryx see: TS Plot Tool | Alteryx Help

 

Suggestion 2:
Maybe start my forecasting on a more aggregated level, to my opinion a accurate forecast on a more aggregated level (Like productgroup) is more valuable than an inaccurate forecast that is on the desired forecast detail level (the ProductID). In my time series forecasting project I would like to have forecast on a daily level, but I just know that the forecast models produce inaccurate forecast because I did the research in suggestion 1. Now i'm forecast on the weekly level which produces pretty accurate forecast which in my case is more valuable than the daily forecast.

Suggestion 3:
If you have pretty accurate forecast on the product group level or an even higher aggregated level and you stil want to have forecast on the ProductID level: You can take a look at Hierarchical Time Series forecasting and proportional distribution. Using these two theories you can do the following: 

Let's say you have 3 product groups (Electronics, Consumer electronics and Cameras) where you need to forecast the monthly demand. This means you will have to set up 3 univariate time series models (using ARIMA or ETS in alteryx) and calculate the forecast. For an example in this post I will only do the product group 'Cameras'  The forecast results could be:

 

Product groupDateForecast / Demand
Cameras1/9/202010.000
Cameras1/10/202011.000
Cameras1/11/20208.000
Cameras1/12/202015.000
Cameras1/1/202112.000

 

Say the following productID's are within the product group 'Cameras'

Product groupProductIDActuals June 2020Actuals July 2020Actuals August 2020
CamerasCAM0017.0006.0008.000
CamerasCAM0023.0002.0001.500
CamerasCAM0032.0001.5001.000

By doing proportional distribution you can distribute the forecast of the product group to the productID level based on the hisoric actuals:
Total actuals of june, july and august 2020: 7+6+8 + 3+2+1,5 + 2+1,5+1 = 32.000
CAM001 will receive X% of the monthly product group forecast with X being: (7.000 + 6.000 + 8.000) / 32.000 = 66%
CAM002 will receive X% of the monthly product group forecast with X being: (3.000 + 2.000 + 1.500) / 32.000 = 20%
CAM003 will receive X% of the monthly product group forecast with X being: (2.000 + 1.500 + 1.000) / 32.000 = 14%

So you would get a monthly forecast on productID level based on a monthly forecast on product group level that is proportionally distributed to the productID's

DateProduct groupProduct group forecast/ demandProductIDProductID distribution percentageProductID forecast / demand
 1/9/2020Cameras10.000CAM00166%6.562
 1/9/2020Cameras10.000CAM00220%2.031
 1/9/2020Cameras10.000CAM00314%1.406
 1/10/2020Cameras11.000CAM00166%7.218
 1/10/2020Cameras11.000CAM00220%2.234
 1/10/2020Cameras11.000CAM00314%1.546

 

ProductID forecast calculated by multiplying the product group forecast by the productID distribution percentage.

 

We now did this for only the product group Cameras with only 3 productIDs. If you think this can be a valid approach to calculate your monthly demand on productID level: do this for every productgroup and for every productID. Do keep in mind that you have to choose yourself how many months of actuals you include in determining the ProductID distribution percentage.


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Useful articles:
1. Hierarchical Time Series 101. by Chinmay Palande and Javier Recasens | by Opex Analytics | The Opex ...
2. Chapter 10 Forecasting hierarchical or grouped time series | Forecasting: Principles and Practice (o...
3. Time Series Analysis in Python - A Comprehensive Guide with Examples - ML+ (machinelearningplus.com)
4. Champagne Analytics: A Time Series Tutorial - Alteryx Community

and plenty of other articles for understanding what the process of time series forecasting is.

 

-------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Hopefully this information is helpful for you. Keep in mind that forecasting can never have perfect results and that a big part of time series forecast is to do research on the topic, making clear what your forecast problem is and its restrctions and finally to get an understanding of your historic data. And that it's important to execute these steps before starting to build a forecast model.

 

Let me know if you have any question,
Jimmy

Labels