| predict.etree {etree} | R Documentation |
Predictions for Energy Trees
Description
Compute predictions for objects of class "etree" (i.e., fitted Energy
Trees as returned by etree(), or as contained in
the ensemble element of a fitted Random Energy Forest).
Usage
## S3 method for class 'etree'
predict(object, newdata = NULL, perm = NULL, ...)
Arguments
object |
A fitted Energy Tree 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
|
perm |
Optional character vector of variable names. Splits of nodes
with a primary split in any of these variables will be permuted (after
dealing with surrogates). Note that surrogate split in the |
... |
Additional arguments. |
Details
The predict() method for "etree" objects yields predictions for
fitted Energy Trees as returned by etree() or as
contained in the ensemble element of a fitted Random Energy Forest.
Predictions are based either on fitted values (if newdata is
NULL) or on the new set of covariates (if newdata is provided).
The values of split_type and coeff_split_type, as well as the
number of components for each structured covariate (needed to compute an
equivalent representation for the covariates in newdata when
split_type = "coeff"), are automatically retrieved from the object of
class "etree".
Value
Predictions, in the form of a factor for classification or as a numeric vector for regression.