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

I am using an ensemble model in SAS eminer to join a Decision Tree and two Regression Models and need to collect the variables in SAS Eguide for scoring new data.

 

All three models are looped over a segment (of which there are 30) with start and end groups.

 

I know that for a regression model variables are stored in emws1/reg_effects and worked out that emws1/reg_effects_loop will provide all input variables for each looped regression model.

 

However, I am unable to find a similar file for decision trees or other models.

 

I can find for example emws1/tree_variableset - but this has too few variables (I think it is for a single segment - presumably the last).

Of course, if there is a final list somewhere (maybe in the ensemble model file?) that contains all variables used in all parts of the model that would be the best (rather than importing separately for each model).

 

Thanks in advance and please let me know if anything is unclear.

 

Below is the code I'm using (in this case, reg_effects_loop will pull all variables happily, whereas the other two seem to be pulling variables for only one segment). 

 

data frankie.&projx._eff_tree (keep=variable);
rename name=variable;
set  &SEM..tree_variableset (where=(role='INPUT'));
run;
data frankie.&projx._eff_reg (keep=variable);
rename name=variable;
set  &SEM..reg_effects_loop (where=(role='INPUT'));
run;
data frankie.&projx._eff_princomp (keep=variable);
rename name=variable;
set  &SEM..princomp_variableset (where=(role='INPUT'));
run;

data frankie.&projx.eff_all;
set 
frankie.&projx._eff_reg
frankie.&projx._eff_tree
frankie.&projx._eff_princomp
;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
WendyCzika
SAS Employee

The tree_outimport data set has the variable importance for the inputs for the Decision Tree node, so you can use that to subset the variables, you would just need to filter out the rows that have importance=0 to remove the un-used inputs.

View solution in original post

2 REPLIES 2
WendyCzika
SAS Employee

The tree_outimport data set has the variable importance for the inputs for the Decision Tree node, so you can use that to subset the variables, you would just need to filter out the rows that have importance=0 to remove the un-used inputs.

frankie_s_tyo
Calcite | Level 5

Many thanks - there exists a file 'tree_outimport_loop' which has all iterations inside that I was able to use.

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