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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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