Alteryx Designer Desktop Discussions

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

TS Model Factory ETS forecasts

LLebed
6 - Meteoroid

Hello everyone,

 

I am quite new to predictive analytics of Alteryx. As a new person i read that it would be wise to try and use the already pre-made models in Alteryx instead of trying to create my own. Currently using ver 10.5

 

I am trying to forecast sales by store by week using historical sales data. In order to do that i am using a TS Model Factory that i have obtained from one of the topics on this forum. Arima model appears to get generated correctly with reasonable WoW difference, however ETS model just gives me the same forecast for all of the periods.

 

In the TS Factory Sample flow however, ETS model generates different figures for different periods. 

 

Can someone advise on what is wrong with my data for ETS model or settings?

 

I could not locate a similar topic via google...

 

Thanks

 

edit: i think i found where the issue might be.... the ETS model on its' own appears to generate different figures when I have Model type -> Trend Type selected as Multiplicative, however when set on Auto it generates a straight line. What would be a best way to alter Model Factory so that it works on Multiplicative and not Auto?

6 REPLIES 6
AmeliaG
Alteryx
Alteryx

Hi @LLebed,

 

Thanks for your question! The model factory tool does not have this functionality built in, but you can edit the underlying macro by right clicking on the tool and selecting 'open macro'. 

 

openmacro.png

 

Within the macro, the code powering the model is in the 'R' tool. 

 

rtool.png

 

You can edit and update the code for the ETS model (perhaps update the macro interface as well) and save your changes. Note: you can open up the regular ETS model tool as well and see the code inside. 

 

If you prefer not to update the R code, then you can create a batch macro using the regular ETS tool. Here is a helpful video which details how to create a batch macro. For your use case, the store identifier field will be the control parameter. 

 

Hope this helps!

 

Amelia

 

P.S. If you would like to see the Model factory tool extended to include multiplicative for ETS models, I recommend you submit the idea to our 'Ideas' page

 

 

LLebed
6 - Meteoroid

Thank you, i will have a play around :) i am quite new to R but it is on my "to do" list @AmeliaG If you could type in the part of code that needs changing would be very helpful

AmeliaG
Alteryx
Alteryx

@LLebed,

 

I'm glad this was helpful. Since you are new to R, perhaps the best approach would be the 'batch macro' I suggested. It does not require you to update the R code whatsoever. 

 

Hope you have a great day!

 

Amelia

LLebed
6 - Meteoroid

@AmeliaG <--- i don't think i am replying correctly but attempts are made

 

Hi Amelia,

 

I had a go at batch macro and did achieve the results, however it has taken 46minutes to do finish the flow. In comparison running the same data through 2 Factories that produce both ARIMA and ETS (linear) forecast  takes 1-2minutes.. Based on that i guess i need to get into R code.

 

If someone could pinpoint the field i need to change in the R code of the Factory to force it generate the "Trend_Type = Multiplicative" would be great

 

Thanks,

Lev

AmeliaG
Alteryx
Alteryx

Hi @LLebed,

 

Yes, the batch macro approach will run longer than the Factory tool as instead of running everything in a single instance of R, it will spin up a new instance of R for each batch - thus taking longer to run. 

 

Unfortunately, I do not know R well enough to tell you how to update the code. I do feel from looking at the code, however, that is it not as simple as changing the trend type to multiplicative. 

 

One thing to consider is that while you are running your model factories quickly, 45 minutes is still a manageable amount of time for a process to run, especially if you have it running on a schedule. That way you do not have to wait for it to run each time and can simply digest the results. 

 

In the meantime, you can post this idea (adding the Multiplicative trend type for the Factory Model tool) to our Ideas page. When it comes time to plan, our products team will always look to the ideas page for new features. 

 

Hope you have a great day!

 

Amelia

LLebed
6 - Meteoroid

Hi Amelia,

 

Just a feedback on Batch Macro in case anyone else is going to find this thread:

 

It tends to generate timeout errors which are linked to the amount of periods i want the model to forecast/ amount of "batches"

 

Based on that, i could say batch macroing for ETS model is a good small scale solution, however it's usefulness reduces as task becomes bigger/more complex

 

Will have to only use ARIMA generated via Model Factory, better than nothing :)

 

Thanks,

Lev


Labels