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;
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.