Hi everyone,
Is there a way to set a seed for the cross validation statement in proc forest. I have already set a seed for the proc forest model and it states in the log that the cross validation is using the same seed. However I noticed that when I run the same model multiple times, the Cross-Validation Fit Statistics differs for each run.
Post your code and the log so we can see what kind of cross-validation you are using.
If you are using the PARTITION statement, you can set the seed there.
Some types of cross-validation do not use randomness. For example, you can put observations 1,6,11,16,... into one fold, observations 2,7,12,17,... into the second fold, etc.
Hi Rick,
This is the code for the proc forest procedure with cross validation statement:
proc forest data=MODELINPUT seed=1854718772
maxdepth=29
ntree=100;
target tgt / level=interval;
input var1 var2 var3 var4 var5 var6 var7 var8 var9 / level=interval;
input var10 / level=nominal;
crossvalidation kfold=5;
run;
Also, I have attached a screenshot of the log.
Thank you!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.