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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

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