Alteryx Designer Desktop Discussions

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

Logistic Regression: No Target Variables to select

GeoMM
5 - Atom

I built two basic logistic regressions with the same data, the first does not recognize the two variables (0,1) selected as the target and the second does not even allow me to even select a target variable. The confounding issue is that I think I built them the same.  Any help would be appreciated.  Cheers

3 REPLIES 3
CristonS
Alteryx Alumni (Retired)

hi @GeoMM - the Logistic Regression tool does not accept byte fields as predictors.  If you change [class] to a string type, the workflow runs without error. 

GeoMM
5 - Atom

Thanks so much @CristonS. I thought it was something like that.  I went looking through the Alteryx's Logistic Regression Help (https://help.alteryx.com/11.7/index.htm#cshid=logistic.htm) but it did not mention anything about this.  What is a good resource for detailed information like this?   Thanks again!

CristonS
Alteryx Alumni (Retired)

hi @GeoMM - happy to help!  For any of the R based tools, you can right-click the tool to open the macro.  This will expose the interface tools and their configurations, as well as the R code that drives the tools.

 

For example, in the Logistic Regression, the Drop Down tool for target variable selection includes the following field types:

 

YVar.JPG

 

You can see here that bytes are not an acceptable field type. This info will be in the upcoming Logistic Regression Tool Mastery article, with a ton of additional useful and interesting information.

 

The AutoField tool can be great, especially with a csv input, but you'll still need to check to make sure the corrected field types are appropriate for modelling.  Similarly, your model results were 100% accurate, which can be misleading, since your sample was not split in to a training and validation set.  This article can help with those techniques, as well as help prevent overfitting your model.  And this article demonstrates cross-validation techniques for internally sampling your "training" data. 

 

Keep up the good work!

Labels