Supply new input data for predicting the outcome with a fitted logicDT model.
# S3 method for logic.bagged
predict(object, X, Z = NULL, type = "prob", ...)# S3 method for logic.boosted
predict(object, X, Z = NULL, type = "prob", ...)
# S3 method for logicDT
predict(
object,
X,
Z = NULL,
type = "prob",
ensemble = FALSE,
leaves = "4pl",
...
)
# S3 method for genetic.logicDT
predict(
object,
X,
Z = NULL,
models = "best",
n_models = 10,
ensemble = NULL,
leaves = "4pl",
...
)
A numeric vector of predictions. For binary outcomes, this is a vector with estimates for \(P(Y=1 \mid X = x)\).
Fitted logicDT
model. Usually a product of a call
to logicDT
.
Matrix or data frame of binary input data. This object should correspond to the binary matrix for fitting the model.
Optional quantitative covariables supplied as a matrix or data frame. Only used (and required) if the model was fitted using them.
Prediction type. This can either be "prob"
for
probability estimates or "class"
for (hard)
classification of binary responses. Ignored for regression.
Parameters supplied to predict.logicDT
If the model was fitted using the inner
validation approach, shall the prediction be constructed
using the final validated ensemble (TRUE
) or using the
single final tree (FALSE
)?
If leaf regression models (such as four parameter logistic
models) were fitted, shall these models be used for the prediction
("4pl"
) or shall the constant leaf means be used
("constant"
)?
Which logicDT models fitted via
genetic programming shall be used for prediction?
"best"
leads to the single best model in the final
generation, "all"
uses the average over the final
generation and "n_models"
uses the n_models
best models.
How many models shall be used if
models = "n_models"
and genetic programming was employed?