predict.gensemble: predict method for generalized ensemble methods.

Description Usage Arguments Details Value Author(s) See Also


Prediction of data using a model built with gensemble


## S3 method for class 'gensemble'
predict(object, X, type = c("prob", "class"), method = c("prob", "vote"), return.all = F, ...)



An instance of gensemble-class.


The input predictors.


For classification, either probabilities or the class name can be returned.


For classification, if method is prob, the assigned class will be the highest probability. If method is vote, the assigned class will be the class with the highest number of votes across all underlying models.


For regression, if TRUE, a matrix with the output of each underlying model will be returned in addition to a the output vector.


Present for compatibility. You could put stuff here but it won't be used.


Please see gensemble for examples.


The return value will vary depending on classification or regression, and if return.all was FALSE (default) or TRUE.

For classification, the return value will be a matrix of probabilities where each row corresponds to the input X and the columns are the classes and the probabilites aggregated from the underlying models.

For regression, the return value will be a vector of the predictor values. If return.all is TRUE, the return value will be a list. The first item is the vector of predicted values, and the second is a matrix where each row corresponds to the input X and each column is the predicted value generated from each model. For example an input X with 150 rows, using a gensemble with 100 underlying models would return a 150 row x 100 column matrix.


Peter Werner and Eugene Dubossarsky

See Also

gensemble, gensemble-class.

gensemble documentation built on May 2, 2019, 1:02 p.m.