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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1582 views
  • 0 likes
  • 2 in conversation