Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Decision Tree Error: Temporary Variable for Formatted Value

Reply
Occasional Contributor
Posts: 8

Decision Tree Error: Temporary Variable for Formatted Value

[ Edited ]

So I have another error with a decision tree node. I am importing a decision tree of another node so my properties are set to:

 

Use Frozen Tree= No

Import Tree Model= Yes

Tree Model Data Data= Tree4_emtree

 

Now im getting an error on a temporary variable for a formatted value.

 

15531 +****** TEMPORARY VARIABLES FOR FORMATTED VALUES ******;
15532 +LENGTH _ARBFMT_12 $ 12; DROP _ARBFMT_12;
15533 +_ARBFMT_12 = ' '; /* Initialize to avoid warning. */
15534 +LENGTH _ARBFMT_0 $ 0; DROP _ARBFMT_0;
ERROR: The length of a character variable must be in the range of 1-32767.
15535 +_ARBFMT_0 = ' '; /* Initialize to avoid warning. */

 

I get that it's because of the length. And im assuming whatever the number is at the end of _ARBFMT_, that is the length being defined. What i don't get is where did _ARBFMT_0 come from and how to change it? When i checked the flow code for Tree 4 (the tree im importing), it doesn't have _ARBFMT_0. It only has _ARBFMT_12. So i don't know where to look at and where it is coming from. Help! Thanks!

 

Sarah

SAS Employee
Posts: 37

Re: Decision Tree Error: Temporary Variable for Formatted Value

This should never happen.  A SAS procedure (ARBOR) is hopelessly confused about the format of a categorical variable.  The procedure generated scoring code with the lines,

 

****** TEMPORARY VARIABLES FOR FORMATTED VALUES ******;
LENGTH _ARBFMT_12 $ 12; DROP _ARBFMT_12;
_ARBFMT_12 = ' '; /* Initialize to avoid warning. */
LENGTH _ARBFMT_0 $ 0; DROP _ARBFMT_0;
_ARBFMT_0 = ' '; /* Initialize to avoid warning. */

 

and so on.  Elsewhere should be lines of the form,

 

_ARBFMT_0 = PUT( variable, format);

 

Such lines reveal the variable and format that tripped the SAS procedure. If you could find those lines you might be able to fix them by 1. correcting format if it is wrong, and 2. putting the length of the format in the LENGTH ARBFMT_0 statement.

 

If you would give SAS Technical Support the Tree4_emtree  data set and let them know I want to look at it, then I will figure out the bug and whether it can be addressed.   (https://support.sas.com/techsup/contact/ )

 

I appologize for the inconvenience.

Kind Regards,
Padraic

Occasional Contributor
Posts: 8

Re: Decision Tree Error: Temporary Variable for Formatted Value

Hi Padraic,

Thanks for your reply. I found something while investigating this error. Apparently, the variable associated with it seem to be not in the input data set. Which makes sense because the variable was rejected in the Variabele selection node before the decision tree.

Take note though that we are migrating this project from a EM 6.2 to 14.1. In the project in EM 6.2, the variable was rejected in variable selection node but it still is a variable in the decision tree node following the variable selection. When the project was migrated to 14.1, on the decision tree i tried to import the tree from the results in 6.2 and that's when this error came out. Still a variable selection before the decision tree node and the variable was rejected. Now i wonder why the variable got thru in 6.2 and now it doesnt in 14.1 (which is more correct actually) and now causes error. I had to go to Manual Selector and force the variable as an Input and not rejected. Was it a bug from 6.2?

Regards,
Sarah
Ask a Question
Discussion stats
  • 2 replies
  • 235 views
  • 0 likes
  • 2 in conversation