predict.logicDT {logicDT} | R Documentation |
Prediction for logicDT models
Description
Supply new input data for predicting the outcome with a fitted logicDT model.
Usage
## S3 method for class 'logic.bagged'
predict(object, X, Z = NULL, type = "prob", ...)
## S3 method for class 'logic.boosted'
predict(object, X, Z = NULL, type = "prob", ...)
## S3 method for class 'logicDT'
predict(
object,
X,
Z = NULL,
type = "prob",
ensemble = FALSE,
leaves = "4pl",
...
)
## S3 method for class 'genetic.logicDT'
predict(
object,
X,
Z = NULL,
models = "best",
n_models = 10,
ensemble = NULL,
leaves = "4pl",
...
)
Arguments
object |
Fitted |
X |
Matrix or data frame of binary input data. This object should correspond to the binary matrix for fitting the model. |
Z |
Optional quantitative covariables supplied as a matrix or data frame. Only used (and required) if the model was fitted using them. |
type |
Prediction type. This can either be |
... |
Parameters supplied to |
ensemble |
If the model was fitted using the inner
validation approach, shall the prediction be constructed
using the final validated ensemble ( |
leaves |
If leaf regression models (such as four parameter logistic
models) were fitted, shall these models be used for the prediction
( |
models |
Which logicDT models fitted via
genetic programming shall be used for prediction?
|
n_models |
How many models shall be used if
|
Value
A numeric vector of predictions. For binary outcomes,
this is a vector with estimates for P(Y=1 \mid X = x)
.