Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Assisted Modelling and Predict Tool Error

PeterAP
8 - Asteroid

Hi, I am trying out the Intelligence Suite's Machine Learning Tools and have run into an error message, but I don't know how to fix it!

 

The assisted model determined the 3 classification model outcomes of which Random Forest was the best and didn't appear to have any issues, but when I run it against the original dataset as a test using the Predict Tool, I get the following error message.

 

"Error: Predict: Scoring the model failed with error: Input contains NaNThis is likely due to unhandled null values. Use a Transformation tool with 'Missing value imputation' transformer to remove null values."

 

Can anyone help!?

7 REPLIES 7
mceleavey
17 - Castor
17 - Castor

Hi @PeterAP ,

 

One or more of your string/categorical fields contains null values. I would suggest using a formula tool to replace these, then allow the assisted modelling to one-hot encode the categorical variables.

 

That should fix the problem.

 

Remember, you need to ensure that the same prep is done to both the records feeding the model, and the records you are going to predict, otherwise you'll have a variable mismatch.

 

Hope this helps,

 

M.



Bulien

Stormphoenix
6 - Meteoroid

Hi, I'm also having this same error but all null values have been filtered out, were you able to solve this issue?

Samantha_Jayne
Alteryx
Alteryx

Hi @Stormphoenix @PeterAP  can I confirm are you both opening an example from a starter kit to see this error? I have stumbled across this one myself today and just wanted to confirm.

Samantha Clifton
Alteryx
#alteryxrocks
PhilipL
Alteryx
Alteryx

@Stormphoenix, @mceleavey@PeterAP  A few of us have seen this error pop up in the Intelligence Suite starter kit example "Validate Invoices at Risk."  It appears that starting with 2022.1, the Image Template or Image to Text tool is picking up some alpha characters in the "Supplier" field from the input PDFs. The rest of the flow, including the assisted Modeling tools, is expecting the Supplier field to be numeric.

 

Quick fix to get the flow working - filter out the records that have alpha characters in the "Supplier" field and change the field type to a double, pass the remaining records along in the flow.

 

 

Samantha_Jayne
Alteryx
Alteryx

Here is a replacement workflow if you are on the latest version, that is working as expected with no model failures.

Samantha Clifton
Alteryx
#alteryxrocks
mceleavey
17 - Castor
17 - Castor

Ledge.



Bulien

frank_sanseri
Alteryx
Alteryx

As @PhilipL mentioned, we did a thorough examination of the issue, and found that it was specifically the "Supplier" field that sits on the right edge of the blue bar at the top of the sample PDFs. Recreating that template field with slightly different boundaries corrected some of the values, but we weren't able to achieve 100%.  Going further, we tested on various colored backgrounds and text, but the issue only seemed to manifest in that particular circumstance. Removing records that don't resolve to a numeric data type is the best solution so far for this Starter Kit, and there is a replacement workflow that does just this posted by @Samantha_Jayne in this thread. 

Labels