Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Error in Forest Model

sidjain1112
6 - Meteoroid

I am getting following error in forest model

 

Error: Score (22): Score: Error in predict.randomForest(mod.obj, newdata = new.data, type = "response") :

 

Please have a look at the attached workflow with data and let me know what could be the cause.

 

5 REPLIES 5
DultonM
11 - Bolide

Hi @sidjain1112! It doesn't look your workflow was attached...could you try again?

sidjain1112
6 - Meteoroid
 
david_fetters
11 - Bolide

So it looks like WeekNumber and Season_Number are set as V_Strings, which means R is treating them as categoricals (rather than continuous or ordinal variables).  With the forest modeler, if there are categorical values present in the scoring stream that were not available in the training stream, those rows will not be scored and cause an error.  In your example, the WeekNumber and Season_number had 7 categories in your 9 rows that were not present on training.

 

No error is generated if you score your model on the training data (which means no new categories at scoring time) by connecting your Sample 19 rows output to the scoring node.

 

You can also stop an error from occurring by changing WeekNumber and Season_Number to an integer value type, which is then treated as ordinal/continuous by the Forest Model.  That also eliminates the problem of missing categorical values!

 

We have moved away from using a straight up forest model when we deal with large numbers of categories and small training sets and tend to use Boosts which aren't as finnicky with missing categories.  Whether that is an acceptable solution in your case, or whether changing your variable types to continuous is acceptable, will depend on the specific model you're trying to build.  Hope this helps!

exconn713
5 - Atom

Your model returns the following error:

 

Score: Error in predict.randomForest(x, newdata=new.data, type= "prob"):

Score: The R.exe exit code (1) indicated an error. 

 

If you receive this error, you probably have a variable that has the wrong Data type assigned to it. 

 

Example: Age, Distance, Weight is assigned as a V-String

 

Correct: Age, Distance, Weight should be Double (numeric)

 

You can use Select or the Data Cleansing to change the variable data types. 

vikasbharadiya
5 - Atom

Hi everyone,

 

I am predicting via random forest model in alteryx environment. I am getting below error

 

Error: Score (10): Score: Error in predict.randomForest(mod.obj, newdata = new.data, type = "response") :

 

Error: Score (10): Score: Execution halted

 

Error: Score (10): Score: The R.exe exit code (1) indicated an error.

 

Kindly help me.

 

Regards

Vikas Bharadiya

Labels