predict.cocktailEnsemble: Predict method for cocktailEnsemble objects.

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/predict.cocktailEnsemble.R

Description

Prediction of new data using cocktailEnsemble. predict combines the predictions from all models contained in the cocktail by taking the mean of the probabilities.

Usage

1
2
## S3 method for class 'cocktailEnsemble'
predict(object, newdata=NULL,...)

Arguments

object

An object of class cocktailEnsemble, as created by the function cocktailEnsemble.

newdata

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

...

Not used currently.

Value

A vector containing the probabilities of the predicted event.

Author(s)

Dirk Van den Poel, Michel Ballings, Andrey Volkov, Jeroen D”haen, Michiel Van Herwegen

Maintainer: Michel Ballings <Michel.Ballings@GMail.com>

References

Van den Poel, D., Ballings, M., Volkov, A., D”haen, J., Van Herwegen, M., Predictive Analytics for analytical Customer Relationship Management using SAS, Oracle and R, Springer, Forthcoming.

See Also

Other functions in this package: imputeMissings, Aggregate, cocktailEnsemble, predict.cocktailEnsemble

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#Credit Approval data available at UCI Machine Learning Repository
data(Credit)

#Create training set (take a small subset for demonstration purposes)
Credit <- data.frame(Credit[order(runif(nrow(Credit ))),])[1:100,c('V2','V3','V8','V11','V14','V15','Response')]
trainingset <- Credit[1:1:floor(0.50*nrow(Credit)),]
#Create test set
testset <- Credit[(floor(0.50*nrow(Credit))+1 ):nrow(Credit),]


#Train Cocktail Ensemble on training data
cE <- cocktailEnsemble(x=trainingset[,names(trainingset)!= "Response"],y=trainingset$Response)

#Deploy Kernel Factory to predict response for test data
pred <- predict(cE,testset[,names(testset)!= "Response"])

aCRM documentation built on May 1, 2019, 8:29 p.m.