Learn R Programming

hybridEnsemble (version 1.7.9)

predict.hybridEnsemble: Predict method for hybridEnsemble objects

Description

Prediction of new data using a hybridEnsemble model.

Usage

# S3 method for hybridEnsemble
predict(object, newdata, verbose = FALSE, predict.all = FALSE, ...)

Value

A list containing the following vectors:

predMEAN

Predictions combined by the simple mean

SB

A label denoting the single best algorithm: RF=Random Forest, LR= Bagged Logistic Regression, AB= AdaBoost, SV=Bagged Support Vector Machines, NN=Bagged Neural Networks, KF=Kernel Factory

predSB

Predictions by the single best

predAUTHORITY

Predictions combined by authority

..and all the combination methods that are requested in the hybridEnsemble function.

Arguments

object

An object of class hybridEnsemble created by the function hybridEnsemble

newdata

A data frame with the same predictors as in the training data

verbose

TRUE or FALSE. Should information be printed to the screen

predict.all

TRUE or FALSE. Should the predictions of all the members be returned?

...

Not currently used

Author

Michel Ballings, Dauwe Vercamer, Matthias Bogaert, and Dirk Van den Poel, Maintainer: Michel.Ballings@GMail.com

References

Ballings, M., Vercamer, D., Bogaert, M., Van den Poel, D.

See Also

hybridEnsemble, CVhybridEnsemble, importance.hybridEnsemble, plot.CVhybridEnsemble, summary.CVhybridEnsemble

Examples

Run this code

data(Credit)

if (FALSE) {
hE <-hybridEnsemble(x=Credit[1:100,names(Credit) != 'Response'],
                    y=Credit$Response[1:100],
                    RF.ntree=50,
                    AB.iter=50,
                    NN.size=5,
                    NN.decay=0,
                    SV.gamma = 2^-15,
                    SV.cost = 2^-5,
                    SV.degree=2,
                    SV.kernel='radial')

predictions <- predict(hE, newdata=Credit[1:100,names(Credit) != 'Response'])
}

Run the code above in your browser using DataLab