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.
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.