Hello,

If you run the example in ?bag you can type

data(BloodBrain)
ctreeBag$aggregate

at an R prompt to see an example aggregate function. Note that it dos _not_ have the parenthesis.

Hope this helps,

Rui Barradas

Em 14-04-2013 11:31, Nicolás Sánchez escreveu:
Good morning all.

I am doing bagging with package caret. I need bagging for a classification
problem. I am working with " bag".

bag(x, y, B = 10, vars = NULL, bagControl = bagControl(), ...)

bagControl(fit = NULL,
            predict = NULL,
            aggregate = NULL,
            downSample = FALSE)


My fit function is:

svmFit <- function(x, y, ...)
   {
     library(e1071)
     svm(Score~., data = mydataset)
   }


My predict function is :


svmPred <- function(object, x)
   {
     predict(object, x)[,1]
   }


However, I don't know how to build the aggregate function.

Does anyone know how to develop it?

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to