BookmarkSubscribeRSS Feed
akoohi
Calcite | Level 5

Hello,

 

I am interested in exact node association in the tree generated by hpsplit. For example, of the leaf node is 45 what is its parent node in the tree? Is there any dataset that I can look at as an output of the HPSPLIT tree that has this information?

 

Thanks,

Arezou

4 REPLIES 4
ballardw
Super User

You may get a more useful example by providing data and or using or one of the examples provided by SAS with code similar to what you are using.

akoohi
Calcite | Level 5

tree_example.png

 

Here is the output of HPSPLIT tree, is there any way to get an output option that shows the parent of node A is node 7, for all of the nodes in datasets?

ballardw
Super User

Using one of the SAS supplied examples for HPSPLIT to start with:

ods graphics on;

proc hpsplit data=sashelp.baseball seed=123;
   class league division;
   model logSalary = nAtBat nHits nHome nRuns nRBI nBB
                     yrMajor crAtBat crHits crHome crRuns crRbi
                     crBB league division nOuts nAssts nError;
   output out=hpsplout;
   ods output wholetreeplot= work.wholetree
              zoomedtreeplot= work.zoomtree
   ;
run;

Looking at the Details section, ODS Graphics, of the online help for Proc Hpsplit the plot names for nodes are Wholetreeplot and ZoomedTreePlot. Each of these contains parent/child node information though a bit differently. The nodes labeled A are using hex notation instead of 10, B for 11 and so on. So you may need to think through the display a bit.

akoohi
Calcite | Level 5

omg, you are a life saver. thank you so so much.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 906 views
  • 1 like
  • 2 in conversation