predict.swag {swag}R Documentation

Predict method for SWAG

Description

Gives predictions for different train learners obtained by swag.

Usage

## S3 method for class 'swag'
predict(
  object,
  newdata = NULL,
  type = c("best", "cv_performance", "attribute"),
  cv_performance = NULL,
  attribute = NULL,
  ...
)

Arguments

object

An object of class swag.

newdata

an optional set of data to predict on. If NULL the original training data are used.

type

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.

cv_performance

a level of CV errors (between 0 and 1) combines with type "cv_performance".

attribute

an attribute combines with type "attribute".

...

Not used for the moment.

Details

Currently the different train learners are trained (again) to make the predictions.

Value

Predictions .

Author(s)

Gaetan Bakalli, Samuel Orso and Cesare Miglioli


[Package swag version 0.1.0 Index]