BookmarkSubscribeRSS Feed
WilliamB
Obsidian | Level 7

Hello,
I'd like to make a decision tree that starts with the 'age' variable and then processes the variable 'DebtRatio'.
And another decision tree that starts this time by 'DebtRatio' then 'age'.

 

Because I want only 2 split, I want to see the difference of decisions in these 2 cases.

 

 

How to do this?

Thanks for your help.

 


proc hpsplit data=train seed=15531 maxdepth=2 splitonce ;
model SeriousDlqin2yrs = DebtRatio age ;
grow Ftest;
prune costcomplexity;
code file='treesc.sas';
rules file='projetrules.txt';
output out = scoredtraining ;
run;
quit;

 

1 REPLY 1
WendyCzika
SAS Employee

To be able to force particular splits, you would have to use the Interactive Decision Tree Application in the Decision Tree node in EM.  Only automated splitting is available in the HP Tree node / PROC HPSPLIT.

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 1 reply
  • 2575 views
  • 0 likes
  • 2 in conversation