sbf(x, ...)## S3 method for class 'default':
sbf(x, y, sbfControl = sbfControl(), ...)
## S3 method for class 'formula':
sbf(form, data, ..., subset, na.action, contrasts = NULL)
## S3 method for class 'sbf':
predict(object, newdata = NULL, ...)
y ~ x1 + x2 + ...
formula
are preferentially to be taken.sbfControl
. (NOTE: If given, this argument must be named.)sbf
sbf
: arguments passed to the classification or regression routine (such as randomForest
). For predict.sbf
: augments cannot be passed to the prediction functionsbf
, an object of class sbf
with elements:sbfControl$saveDetails
is TRUE
, this is a list of predictions for the hold-out samples at each resampling iteration. Otherwise it is NULL
sbfControl$returnResamp
is "all", a data frame of the resampled performance measures. Otherwise, NULL
predict.sbf
, a vector of predictions.For each iteration of resampling, the predictor variables are univariately filtered prior to modeling. Performance of this approach is estimated using resampling. The same filter and model are then applied to the entire training set and the final model (and final features) are saved.
The modeling and filtering techniques are specified in sbfControl
. Example functions are given in lmSBF
.
sbfControl
data(BloodBrain)
## Use a GAM is the filter, then fit a random forest model
RFwithGAM <- sbf(bbbDescr, logBBB,
sbfControl = sbfControl(functions = rfSBF,
verbose = FALSE,
method = "cv"))
RFwithGAM
predict(RFwithGAM, bbbDescr[1:10,])
Run the code above in your browser using DataLab