Hello:
I'm trying to use the model comparison tool comparing a decision tree and logistical regression model, I get the below errors. The models seem to run fine in and of themselves, but the model comparison does not. Has anyone else encountered this and have suggestions to correct it?
Model Comparison (12) Tool #3: Error in FileYXDBStreaming::Read - Unexpected number of bytes to read. Invalid argument
Model Comparison (12) Tool #3: Error in if (names(models_df)[1] != "Name" || names(models_df)[2] != "Object") { :
Model Comparison (12) Tool #3: Execution halted
Model Comparison (12) Tool #3: The R.exe exit code (1) indicated an error.
Solved! Go to Solution.
Hi @jbh1128d1
The Model Comparison tool on the Predictive District of the Gallery is not compatible with the Linear Regression, Logistic Regression, and Decision Tree tool versions released with Alteryx 11.0 (these tools have been largely unchanged in the versions following that release). To workaround this issue, you can change the tool version of your Decision Tree and Logistic Regression Tools to version 1.0.
Please let me know if this doesn't resolve your issue!
Hi @denizbeser,
The first thing I noticed in your workflow is that your Target Variable, Cluster, has a numeric data type (Int16), although it seems to represent a categorical variable. This will cause the models you've selected to build Regression Trees/Forests, because it perceives the target variable is continuous. Changing the data type of your Cluster variable to string will cause the models to treat the variable as categorical.
Additionally, a few of your predictor variables are causing issues. Your Type variable only has one unique variable, your Store variable is a unique identifier, which has no predictive value and cause errors.
Also, your City predictor variable has 64 unique values out of 84 total records, the highest frequency being 5 for L.A. This is also most likely not a very valuable predictor variable, and can cause problems with the models you've selected. You can actually see this written out in the error messages if you turn on all macro messages (Workflow - Configuration > Runtime > Show All Macro Messages). This option passes on warnings and errors from R into the Results Window.
I was able to determine a lot of this of this using just the Field Summary Tool. When first working with a new data set, it is best practice to spend time doing data investigation. There is a series on the Community called Pre-Predictive: Using the Data Investigation Tools that you might find helpful. The first part of this series can be found here.
Correcting these issues with your Model configurations should allow your entire workflow to run successfully. I think the errors you are seeing in the Model Comparison tools are because model objects are not being passed down from the Model Tools.
There is another article on Community I think you might find helpful, called Troubleshooting the Predictive Tools. This article reviews helpful tips and tricks like turning on macro messages and searching R errors.
Does this all make sense? Do you have any questions? Please let me know!
Thanks!