predict.eforest | R Documentation |
Compute predictions for objects of class "eforest"
(i.e., as returned
by eforest()
).
## S3 method for class 'eforest' predict(object, newdata = NULL, ...)
object |
A fitted Energy Forest of class |
newdata |
Optional set of new covariates used to make predictions. Must be provided as a list, where each element is a different variable. Currently available types and the form they need to have to be correctly recognized are the following:
Each element (i.e., variable) in the covariates list must have the same
|
... |
Additional arguments. |
The predict()
method for "eforest"
objects computes predictions
for Energy Forests as returned by eforest()
.
Predictions are based either on the fitted values (if newdata
is
NULL
) or on the new set of covariates (when newdata
is
provided). In both cases, each tree in object$ensemble
is used to make
predictions by calling predict()
on it
(with the same specification of newdata
). Then, individual trees'
predictions for any single observation are combined by majority voting rule
for classification or by arithmetic mean for regression.
Predictions, in the form of a factor for classification or as a numeric vector for regression.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.