Description Usage Arguments Value Author(s) References See Also Examples
View source: R/predict.cocktailEnsemble.R
Prediction of new data using cocktailEnsemble
. predict
combines the predictions from all models contained in the cocktail by taking the mean of the probabilities.
1 2 |
object |
An object of class |
newdata |
A data frame with the same predictors as in the training data. |
... |
Not used currently. |
A vector containing the probabilities of the predicted event.
Dirk Van den Poel, Michel Ballings, Andrey Volkov, Jeroen D”haen, Michiel Van Herwegen
Maintainer: Michel Ballings <Michel.Ballings@GMail.com>
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.
Other functions in this package:
imputeMissings
, Aggregate
, cocktailEnsemble
, predict.cocktailEnsemble
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"])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.