Alteryx Designer Desktop Discussions

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

Repeat Regression and Score on Multiple Groups

Nate
5 - Atom

Hello. I have a set of data on which I would like to run the same regression model for multiple groups. The groups are defined by a column in the input data. For each regression I want to score the model and append each set of predictions to one output data.

It seems like a batch macro would do this, but I'm not sure where to start. Any tips would be appreciated.

Cheers!

4 REPLIES 4
KaneG
Alteryx Alumni (Retired)

Hi Nate,

 

The best way that I find to create a batch macro is filter down to one of your 'batches' and then create your flow. Everything after the filter will later become your batch macro with the groups field being your Control Parameter. So, in the very simple case, your workflow would look like this:

 

Image 001 - 20160221 - 160252.png

 

Then you want to turn everything after the filter into a batch macro, which will look like this:

 

Image 001 - 20160221 - 160232.png

 

The Control Parameter will work like your filter. Make sure that Batch Macro is selected under the Workflow Configuration. Icons and so forth can be changed in the Interface Designer.

 

Then your workflow can be summarised to the following, just select your grouping fields on the Macro Configuration on this workflow:

 

Image 001 - 20160221 - 160209.png

 

Kane

RodL
Alteryx Alumni (Retired)

Kane provided a good summary, but I also thought I'd make sure you were aware of the training resources related to macro building.

 

Look towards the bottom of the list under Advanced...Alteryx On-Demand Training

cind
5 - Atom

would you mind breaking down the steps of the control parameter (the second picture).  I know I'm doing something wrong where I can't get it right, and i suspect that i don't know what to put into the Input (I just added my original file but that doens't seem to work).  I would really appreciate it!

KaneG
Alteryx Alumni (Retired)

The Control Parameter will be your grouping field. Often you would have a summarize tool that is just Group By: <grouping field> feeding into the upside down question mark and then select that on the Macro interface as well.

Labels