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

Hi.   Is there a way in SAS to generate predicted values after running a random forest model?  I've looked at the HPFOREST documentation and I don't see a way of doing this.   I've done something similar with CART with Proc HPSPLIT, but I couldn't find a similar way to do it for Random Forests.  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
WendyCzika
SAS Employee

You should be able to use the SCORE statement to create a data set with the predicted values for the training data: https://go.documentation.sas.com/doc/en/emhpprcref/15.2/emhpprcref_hpforest_syntax08.htm

Or you can use the SAVE statement to create an analytic store ("astore") file that allows you to score new data using that generated file in HP4SCORE: https://go.documentation.sas.com/doc/en/emhpprcref/15.2/emhpprcref_hpforest_syntax07.htm

and https://go.documentation.sas.com/doc/en/emhpprcref/15.2/emhpprcref_hp4score_toc.htm  

 

Hope that helps.

View solution in original post

1 REPLY 1
WendyCzika
SAS Employee

You should be able to use the SCORE statement to create a data set with the predicted values for the training data: https://go.documentation.sas.com/doc/en/emhpprcref/15.2/emhpprcref_hpforest_syntax08.htm

Or you can use the SAVE statement to create an analytic store ("astore") file that allows you to score new data using that generated file in HP4SCORE: https://go.documentation.sas.com/doc/en/emhpprcref/15.2/emhpprcref_hpforest_syntax07.htm

and https://go.documentation.sas.com/doc/en/emhpprcref/15.2/emhpprcref_hp4score_toc.htm  

 

Hope that helps.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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