Alteryx Designer Desktop Discussions

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

Fetch browse tool report as text/ table: ARIMA - In-Sample Errors

dev_dixitt
6 - Meteoroid

Hello all,

 

**NEED HELP FETCHING BROWSE TOOL REPORT IN A TEXT/ TABULAR FORM. ARIMA/ In-Sample Errors**

 

I am forecasting item demand quantity using ARIMA for multiple items. I have a batch macro that runs multiple models for one unique item and the aim is to accomplish this for all the items in the time series input.

The forecast required is at the weekly level.

 

The challenge I am facing is regarding the In-Sample Errors (RMSE/ MAPE/ MASE etc. .). To make a selection between multiple forecast models of the same item I have to use MAPE as the selection criteria.

Basically the model with the lowest MAPE is the one I want to select.

 

However I am not able to utilize the in-sample errors in a manner where either I could get them in a tabular format or append the errors to a particular item code when the batch macro runs.

The Render Tool seems to be the only option currently but it does not seem to be optimal and is also computationally taxing.

 

Until now I am able to find these in sample errors in one of the following places.

  1. Output anchor of the ARIMA Tool
  2. Report anchor of the ARIMA Tool
  3. TS Compare tool (We are not using this in our model so this one can be ruled out)

 

Although, these In-Sample errors are in the form of a report in the browse tool. I don’t know what exactly the format is called. But you can see from the screenshots attached below.

The most I was able to do is to put a filter on the Report anchor of ARIMA, select just the line number 7 from the report below and render it in an excel file.

 

Is there a way where I could get these errors in a tabular for where I could append these the forecast output and the item code ?

A sample workflow and example of desired output is attached.

 

 

Thanks

 

 

4 REPLIES 4
KilianL
Alteryx Alumni (Retired)

Hi @dev_dixitt ,

 

Good question!

 

Yes, you can get it in a tabular format:

 

custom ARIMA output.png

 

 

How to get there?

All predictive tools are Alteryx Macros with the R tool at its core, and reporting tools to create the reports.

Right click on the ARIMA tool and click 'open macro' to look under the hood.

Here you can make changes, in your case to output the In-Sample Errors as a table - add a macro output tool at the right location:

custom ARIMA output macro.png

 

If you save the macro now, you will overwrite/update the ARIMA tool. You can avoid this by saving it separately, e.g. in your macro folder. (See here)

To wrap this up, you can update the meta-info of the macro:

 

custom ARIMA output macro 2.png

 

 

Et voilà, you just created your own custom ARIMA tool! 

 

tenor

 

You can find the result attached.

 

 

Please mark this as the solution if it answers your question, it will help others to find solutions quicker.


Kind Regards,
Kilian
Solutions Engineer - Alteryx

dev_dixitt
6 - Meteoroid

@KilianL  

 

This was spot on. Appreciate the help. 

I do have a few follow up questions if that's okay , they would help me optimize the workflow even further.

 

1) You'd already know about the hyperparameters that are input in ARIMA (p,q,d , P, Q,D) . While choosing 'Do full enumeration of models' setting the d (degree of differencing) and D (degree of seasonal differencing) are input as single values while p, q and P, Q are taken in as a range of values. 

 

Example: If I say p (maximum order of autoregressive component) = 3 , then I am basically providing ARIMA with 4 p values, i.e,  [0,1,2,3]. 

Based on these parameters it creates a 'solid space' to look for the optimal solution. Is it possible to alter ARIMA and have d & D also pass as a range of values instead of a single value input? 

2) How do I view the formulae used to calculate MAPE ? What does Inf, -Inf mean ? I know that MAPE cannot be negative.. 

dev_dixitt_0-1626832698663.png

 

3) This may be a stupid one, but why did you put the macro output after the pipe tool and not the table tool 

dev_dixitt_1-1626832823881.png

 

Again, appreciate the help. 

Best , 

Dev 

apathetichell
18 - Pollux

I can answer question 3) - if you want the values you need to get the workflow prior to rendering - otherwise it'll show up as you originally viewed it (ie as formatted html)... so therefore the macro output has to be before the table tool.

 

for 2) here's a quick write-up on calculating MAPE in R - which I assume is buried in the R somewhere... Can I figure it out fast? maybe...

https://www.statology.org/mape-r/

 

For question 1 - if you can do it in R you can do it in Alteryx... So probably?

dev_dixitt
6 - Meteoroid

@apathetichell  appreciate the help. 

 

Question 3) That makes total sense 

 

Question 2) Thanks !!  I was just trying to locate the MAPE calc in the ARIMA Macro and see why am I getting the Inf instead of a numerical value in the MAPE. I will do some further investigation. 

 

Question 1) Now I think that option wasn't given (although I agree it is doable) because you can only compare an ARIMA model based on AIC/ BIC etc.. when they have the same degree of differencing. Hence it will be contradictory to the whole idea of auto model selection.

 

Thanks for the help. 

Appreciate it 

 

Labels