community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.9

The latest release includes several enhancements designed to improve your Community experience!

Learn More

Logistic Regression Error

Meteoroid

Hi 

 

I am new to Alteryx and not sure where to post this. Can you please help? 

 

However, I am getting the following error with the logistic regression tool:

- Logistic regression: error in rawToChar(serialize(the.object, connection = NULL, ascii = TRUE))

- Logistic regression: execution halted

- Tool #: the input '#1' was not initialized. 

 

I have seen similar posts but haven't found a solution that works for me. 

I have about 3 million records and about 30 variables.

 

Thanks

 

 

Alteryx Certified Partner

Hi @KageMoeng,

 

Could you provide either a sample of the data, dummy data, or more information around the use case and the data you're using?

 

Thanks,

 

M.

Meteoroid

Hi M

 

Unfortunately I cannot share the data. However, here is a dummy dataset:

GroupVar1AgeEvent
1010
1150020
1300031
1450040
1218000110
1219333121
1220666130
1221999140

 

I have fitted logistic regression on Event with Group, Var1 and Age as my explanatory variables. Group is a string type with around 30 unique values. Age and Var1 are numeric. Claims is string with 1 if the event occurs and O otherwise.

 

I hope this helps.

 

Thanks  

Alteryx Certified Partner

Hi @KageMoeng,

 

I've had a bit of a play, and the issue may be around the data types and how the categorical variables are being handled. 

I've written a macro to carry out one-hot-encoding which I've attached. Save this into you macros folder then feed your data into the workflow.

Give that a try and let me know how you get on.

NOTE: Your categorical variables must be in string format as must the Record_ID field and your target variable.

 

M.

Meteoroid

Hi M

 

Thanks for the help. Apologies for all the trouble

 

Unfortunately, I am getting errors with solution. I think I am doing somethin wrong.

 

Here is an image of the workflow:

 

Capture.PNG

After running the workflow, the "Event" field is missing from the options the regression.

 

Here are the images of the each of the nodes:

 

first select

 

 Capture2.PNG

 

record ID

Capture3.PNG

 

hot encorder

Capture4.PNG

 

last select

Capture5.PNG

Meteor


KageMoeng - any luck solving this issue? I'm having the same problem. Thank you

Meteor

I'm also having this issue and yet to find a solution.

Labels