Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Model coefficients macro does not return any results

azhaglov
6 - Meteoroid

I am trying to extract Model Coefficients from a simple Logistic Regression for downstream calculations. I found Model Coefficient macro/tool. This tool has been installed to Alteryx Designer 11.0 and then used on the canvas. The Config window states that tool requires no configuration and does not accept any input or output connections. The tool is supposed to return a simple table of Variables and Coefficients. However, once the workflow is finished the macro itself (Beta icon in the attached screenshot) does not return any results.  When I try to open the Macro and execute the workflow (Input - R code - Output) some results are being returned in the output, but they are completely irrelevant (not from my dataset). What am I missing? 

 

Any thoughts or ideas how to tackle this. 

8 REPLIES 8
CristonS
Alteryx Alumni (Retired)

Hi @azhaglov - The Model Coefficients tool needs a model object from a Count, Gamma, Linear, or Logistic Regression model in order to extract the coefficients. Can you let me know where it says that it does not accept input or output connections? 

 

When you run the macro as a workflow, it is using the text input from the Macro Input tool, so would not make sense in the context of your data.  Connect the model object from your regression tool to the Model Coefficients macro, and you should see results that correspond to your model.

azhaglov
6 - Meteoroid

Hi CristonS!

 

Thanks for your clarification.

 

In contrast to any other Tool, this one does not offer incoming/outbound connections feature (has no green arrows on the left/right hand side of the icon). Also, when I open the context menu for the tool there's nothing allowing to build that connection. Automatic pop-ups in the proximity of Logistic Regression tool also do not work. The same is happening when I try to connect O output of the Logistic Regression to the Model Coefficient tool - no reaction. Perhaps, I am doing something wrong? The text input for macro as a workflow is not an option, I agree. 

 

INCOMING_CONNECTION_IS_NOT_OFFERED.png

CristonS
Alteryx Alumni (Retired)

hi @azhaglov - perhaps try downloading the macro again?  That is not expected behaviour.  The macro should have both an input and output anchor:

 

model_coeff.JPG

 

azhaglov
6 - Meteoroid

Hi CristonS!

 

What version of the Alteryx are you using? I am using 11.0 and perhaps this is the reason for the bug. 

 

 

 

 

CristonS
Alteryx Alumni (Retired)

I just tested on 11.0.6 and it worked correctly.  I have attached a sample workflow - can you test and see if it works correctly?

azhaglov
6 - Meteoroid

CristonS, 

you workflow worked like a charm! I was able to copy-paste the tool to my workflow and it returned the right coefficients. Now the question is how do I make this tool a part of the standard Predictive palette to make it replicable? I tried via Options->User Setting->Edit User settings-> Macro and in this case the tool loses functionality (the same problem as earlier) for whatever reason.

 

 

CristonS
Alteryx Alumni (Retired)

Hi @azhaglov - Place the macro yxmc file in to this location:

 

C:\Program Files\Alteryx\R-3.3.2\Plugin\Macros\Predictive Tools

 

If you're using the non-Admin version, or if your installation was to a different location, you can find the location by right-clicking one of the standard predictive tools (like the Boosted Model) and opening as a macro.  On the Workflow - Configuration> Workflow tab, the filepath will be specified.

azhaglov
6 - Meteoroid

Works fine! Thanks for your support! 

Labels