Makes predictions using a random regression forest (R.W. Payne).
|Controls printed output (
||Saves the prediction for the observations|
||Save structure from
||Values to use for the explanatory variables; if these are unset for any variable, its existing values are used|
BRFPREDICT makes predictions using a regression forest, as constructed by the
BRFOREST procedure. The
SAVE parameter can be set to a pointer, saved using the
SAVE option of
BRFOREST, containing the necessary information about the forest. Alternatively, if you do not set
BRFPREDICT will use the forest most recently constructed by
The x-values for the predictions can be specified in the variates listed by the
X parameter. These must have identical names (and levels) to those used originally to construct the tree. You can use the
VALUES parameter to supply new values, if those stored in any of the variates or factors are unsuitable.
BRFPREDICT prints the predictions, but you can set option
PRINT=* to suppress this. The
PREDICTIONS option allows you to save the predictions.
BRFPREDICT takes the mean of predictions from the individual trees, made using
Restrictions are ignored.
CAPTION 'BRFPREDICT example'; STYLE=meta SPLOAD [PRINT=*] '%gendir%/data/water.gsh' BRFOREST [PRINT=outofbagerror,youtofbagestimates,importance;\ Y=Water; NTREES=8; NXTRY=3; NUNITSTRY=10; SEED=185090]\ Employ,Opdays,Product,Temp BRFPREDICT [PREDICTION=prediction] Opdays,Product,Temp;\ VALUES=!(20,23,20),!(11.96,13.53,12.66),!(71.90,63.90,54.50)