Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Scoring PROC HPForest

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Scoring PROC HPForest

Howdy

I would like to use a model from PROC HPForest in EG to score a dataset.  It looks like HP4SCORE is designed to take a model output from HPForest but I cannot see how to output the model in any documentation, which is pretty sparse on this PROC.  ods trace on /listing does not indicate any useful objects are being output for this purpose.

Any ideas?

thanks


Accepted Solutions
Solution
‎07-26-2015 03:16 PM
Super Contributor
Posts: 336

Re: Scoring PROC HPForest

Tronfela,

Howdy!

If you created your HPForest model using Enterpise Miner, the easiest to score in EG would be to borrow the scorecode sas program as described in the tip below.

Step number 4 tells you where to grab it. It includes a HP4Score that you can use as an example.

I know it is a bit confusing that you have to use another proc to score, but it keeps thing very efficient. Data step code to score an hpforest model would be quite large.

I hope this helps!

Miguel

View solution in original post


All Replies
Solution
‎07-26-2015 03:16 PM
Super Contributor
Posts: 336

Re: Scoring PROC HPForest

Tronfela,

Howdy!

If you created your HPForest model using Enterpise Miner, the easiest to score in EG would be to borrow the scorecode sas program as described in the tip below.

Step number 4 tells you where to grab it. It includes a HP4Score that you can use as an example.

I know it is a bit confusing that you have to use another proc to score, but it keeps thing very efficient. Data step code to score an hpforest model would be quite large.

I hope this helps!

Miguel

New Contributor
Posts: 2

Re: Scoring PROC HPForest

Thanks.  That is pretty close to what I ended up using.  I intended to create a macro in EG, so hp4score seemed like the correct proc.  The "save file=" syntax (below in bold) was what I could not find in any documentation.  It seems to have to appear after ods output and EG editor shows "save" as an error in red.

proc hpforest data=work.rftrain ;

target y /level=interval;

input x1--x42 /level=interval;

ods output fitstatistics=fitstats;

save file="P:\model.bin";

run;

proc hp4score data=rftest;

id Index y;

score file="P\model.bin" out=rfscored;

run;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 3165 views
  • 0 likes
  • 2 in conversation