Alteryx Designer Desktop Discussions

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

Error in Decision Tree

Arjun
7 - Meteor

I am running a normal decision tree model on some financial data and getting the following error:

 

Error: Decision Tree (15): Tool #30: Exception parse error line: 2 column: 363 Expected entity name for reference

 

First of all, there is no Tool#30 in the module. I don't understand the error at all. Unfortunately, I cannot share the data as it is highly confidential. I am attaching the module along. There is no special selection I have done in the Tree macro.

 

The module, however, does not stop at this macro. When I use this model to score a data set, only one record is being scored and the rest are being output as null.

 

If anyone has encountered anything like this, please help. I can answer questions about the data if any. It is a straightforward data set about financial disputes between companies. Thanks!

9 REPLIES 9
jdunkerley79
ACE Emeritus
ACE Emeritus

Tool #30 is within the Decision Tree macro inside Alteryx 

 

Making a very quick guess - I see you have a dot at the end of the column name Billing_Doc. in Select 6

I would suggest trimming the '.' and try again.

 

 

Arjun
7 - Meteor

Thanks for the quick reply. I just saw the tool inside the macro and it is just related to the text that is being output in the result. While I have removed the . from billing_doc and in fact removed all other variables not being used in the model, the error is still there. But now that I know what it is, I am guessing that this error will not affect the model in any way. 

However I am still getting null values in the scoring but for one record. Still can't figure out why this is happening. I have removed all unnecessary variables from the test set as well. 

DylanB
Alteryx Alumni (Retired)

Since we have no access to your data, it's somewhat difficult to replicate the bug. I tweaked the Decision Tree macro to create an extra output directly before tool 30. Maybe it'll help you get an idea of if the data going into it (i.e. coming from the model) is the problem or if something strange is going on in that reporting tool.

Arjun
7 - Meteor

Thank you so much, Dylan, this is very helpful. I have solved the null values problem as well. The test set had values that the train hadn't been trained on.

MarionD
7 - Meteor

Hello,

 

I am having exactely the same problem than Arjun (Error: Decision Tree (2): Tool #30: Exception parse error line: 2 column: 295 Expected entity name for reference ) except that seeing the output from your decision tree macro at the tool N°30 didn't help me.

 

Here is the file I am using (which I cleaned and checked several times to be sure). As for the workflow, I just connected a decision tree without specific settings. 

 

Could you help me understanding where my mistake comes from ? 

 

Thank you for your help

 

 

DylanB
Alteryx Alumni (Retired)

Hi MarionD,

 

It turns out this is because some of your data contains "&" in the LastJobFunction field. "&" is an XML Metacharacter, and so when it goes into that reporting tool 30 (which treats text as raw PCXML), it breaks. I inserted a formula tool prior to the decision tree and redefining the "LastJobFunction" field with the code 

replace([LastJobFunction], "&", "and")

to get it working.

 

Hope this helps,

Dylan

MarionD
7 - Meteor

Yes It helped a lot! Thank you for replying so quickly.

 

I also have a problem with the forest model :

 

Error: Forest Model (8): Forest Model: Error in randomForest.default(m, y, ...) :

Error: Forest Model (8): Forest Model: The R.exe exit code (1) indicated an error.

 

I couldn't find what is wrong neither.. Do I have to change some settings ? I just put the default settings to start!

 

Thank you again

 

DylanB
Alteryx Alumni (Retired)

In general, the errors that R throws just show the function they were thrown in. In your case, this is 

randomForest.default

To get a better idea on the errors, it helps to do the following: "Workflow - Configuration" > "Runtime" > Check "Show All Macro Messages".

 

This will allow you to see the rest of the error, which is 

"Can not handle categorical predictors with more than 53 categories."

 

And with a summarize tool, you can see that "LastJobCountry" has 78 distinct values it takes on.

MarionD
7 - Meteor

Ah ok!! Thank you so much, It will help me a lot to check the errors this way !

 

It works now :)

 

Thank you

 

 

Labels