Alteryx Designer Desktop Discussions

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

Errors with Score Tool

Reesetrain2
9 - Comet

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

 

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

 

I have had the above errors as I wanted to share my troubleshooting steps. Please feel free to add

 

 

  1. I had the above error as there was no way to clear it, however, after some troubleshooting, I was able to solve this error. Here are some troubleshooting steps.

    1. Insert a Data Cleaning Tool and select all fields
      1. The Score and whichever Modeling tool (i.e. Decision Tree, Linear Regression, Logistic, etc.) that you are using is very sensitive to dirty data

     

    1. Insert a Select Tool and make sure that you are using the right data type for the Modeling Tool (Numerical Fields must be either Int, Double, or Fixed Decimal) Failure to properly convert will lead to an error
    2. Make sure that you have done an in-depth Exploratory Data Analysis and see if there are any “wonky” numbers. I had a data set that had a set of numbers with the pattern of 72+14, 56+12 as a number, as it was not immediately apparent that it wasn’t a regular number, as I had to use the Text-to-Column tool to parse these out.
    3. Run your Modeling and Score Tool with the Training Data set. If it works with no errors, you have a possible situation where you have an issue with your categorical variables
      1. The model and the scoring tool are functioning fine with the training data set, but it will throw an error with the Test data set or other data set if it encounters an item from a categorical variable not included in the training data set
      2. Example: You have Batter’s Stance as your variable with (Left-handed, LH, Right-Handed-RH, or Switch Hitter-SH). In your training set, you only have RH or LH, but then the scoring tool encounters SW in the Test data set and there is your error.
        1.       This is especially painful with large datasets and less frequently occurring items in categorical variables where the possibility of the occurrence in Test data set, but not the training data set does exist
      3. Also: you only have 53 possible items max in your categorical variables, so if you have more than 52 items, you will need to recode the others to something like, “Other” or you will get an error
        1.       I like to take the 52 most occurring items using a sort tool
        2.       Then use a find and replace tool to recode the items above

     

    1. Make sure that every field that is contained in the Model is contained in the Test Data set and their data types are properly set
      1. i.e. If you have a numerical variable, be sure that it is changed with a select tool in both Training and Test data sets
        1.       You will receive an error if you have a variable that is set to numeric in the model, but a VString in the Test data set
      2. You should not have any issues with numerical variables that are different as long as they are numeric
    2. Do not worry about the Phantom error: The R.exe exit code (1) indicated an error, do not worry as your workflow will still run, however, this error has been known to occur, without a great explanation as to why.

     

0 REPLIES 0
Labels