Gives predictions for different train
learners obtained by swag
.
# S3 method for swag
predict(
object,
newdata = NULL,
type = c("best", "cv_performance", "attribute"),
cv_performance = NULL,
attribute = NULL,
...
)
An object of class swag
.
an optional set of data to predict on. If NULL
the original training data are used.
type of prediction required. The default is "best", it takes
the best model (with lowest CV errors). The option "cv_performance"
(which requires cv_performance
) allows
to set a level of CV errors under which models are predicted. The option
"attribute" (which requires attribute
) allows to specify an attribute
at which models are predicted.
a level of CV errors (between 0 and 1) combines with
type
"cv_performance".
an attribute combines with type
"attribute".
Not used for the moment.
Predictions .
Currently the different train
learners are trained (again) to make the predictions.