bagFDA(x, ...)
## S3 method for class 'formula':
bagFDA(formula, data = NULL, B = 50, keepX = TRUE,
..., subset, weights, na.action = na.omit)
## S3 method for class 'default':
bagFDA(x, y, weights = NULL, B = 50, keepX = TRUE, ...)
y ~ x1 + x2 + ...
mars
functionB
FDA fitsNULL
or the value of x
, depending on the
value of keepX
fda
, predict.bagFDA
library(mlbench)
library(earth)
data(Glass)
set.seed(36)
inTrain <- sample(1:dim(Glass)[1], 150)
trainData <- Glass[ inTrain, ]
testData <- Glass[-inTrain, ]
baggedFit <- bagFDA(Type ~ ., trainData)
confusionMatrix(predict(baggedFit, testData[, -10]),
testData[, 10])
Run the code above in your browser using DataLab