BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
okbbachabi0
Calcite | Level 5

Hi Guys

 

I'm too new to SAS.

I'm working on a project predicting a model.

I have designed my diagram as shown on the attachment.

When i run the program at the decision tree node I'm getting a run time error. 

So i checked on the result logs (see attachement) and found that the variable has more than 32766 categorical values.

I dont know how to go about this. Any help will be appreciated.

 

Decision tree error.PNGDecision tree.PNG

Thanks guys.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MikeStockstill
SAS Employee

Hello okbbachabi0 -

 

The Interval selection is grayed out if the variable is defined as character in the underlying SAS data set.  The Interval selection is available only for numeric variables.

 

Solutions include:

 

 - convert the character variable to a numeric variable

 - return to the method that you used to create the SAS data set, and define the variable as numeric instead of character.

 

Have a great day.

 

View solution in original post

6 REPLIES 6
HEOR-Ryan
Calcite | Level 5

I would suggest changing the variable to a numeric or continuous measure. It is unlikely to be categorical with that many levels.

Right right-click the dataset and select edit variables to change the type

okbbachabi0
Calcite | Level 5

Hi HEOR-Ryan

Thanks for the reply.

Do you mean to right click on the actual data set as that doesn't give me the option to edit the variables even?

How can I go about this conversion?

thanks

WendyCzika
SAS Employee

In either the Input Data node or a Metadata node inserted in your flow before Decision Tree, you can change the level of that variable to Interval to treat as continuous or to set the role to Rejected to exclude it from the model.

okbbachabi0
Calcite | Level 5

Hi WendyCzika

Thanks. I have tried what you said but when i clicked on the file import node to change the level. The interval is greyed out. From the metadata when I added to the flow doesn't allow me to change the level. I don't want to reject those variables as i need them for my prediction.

Any other advices?

 

Thanks

MikeStockstill
SAS Employee

Hello okbbachabi0 -

 

The Interval selection is grayed out if the variable is defined as character in the underlying SAS data set.  The Interval selection is available only for numeric variables.

 

Solutions include:

 

 - convert the character variable to a numeric variable

 - return to the method that you used to create the SAS data set, and define the variable as numeric instead of character.

 

Have a great day.

 

okbbachabi0
Calcite | Level 5

MikeStockstill

Thanks buddy.

Working perfectly.

Great job.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 3225 views
  • 1 like
  • 4 in conversation