BookmarkSubscribeRSS Feed
constantine
Calcite | Level 5

I am trying to evaluate variable importance by creating a model with hpforest and then running hp4score with importance statement. The problem is freq statement in hpforest. Without this statement i can get non zero results from hp4score. If i have freq statement in hpforest then hp4score produces var importance table with only 0 populated for each var. By the way there is var importance in hpforest output and that produces valid values in either case. But i would like to use var importance from hp4score as it is more accurate. The sample code is below. Thanks!

 

proc hpforest data=a;
target loss_rate;
freq balance;
input var1 var2;
save file='model.sav';
run;

proc hp4score data=a;
importance file='model.sav';
var=(var1 var2);
run;
1 REPLY 1
WendyCzika
SAS Employee

This should work correctly in the latest version, SAS Enterprise Miner 15.2.

The only work-around I can think for the previous versions is to expand your data by the frequency variable so you don't need the FREQ statement in PROC HPFOREST.

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