ModelFrame | R Documentation |
Class for storing data, formulas, and other attributes for MachineShop model fitting.
ModelFrame(...) ## S3 method for class 'formula' ModelFrame( formula, data, groups = NULL, strata = NULL, weights = NULL, na.rm = TRUE, ... ) ## S3 method for class 'matrix' ModelFrame( x, y = NULL, offsets = NULL, groups = NULL, strata = NULL, weights = NULL, na.rm = TRUE, ... )
... |
arguments passed from the generic function to its methods. The
first argument of each |
formula, data |
formula defining the model predictor and
response variables and a data frame containing them.
In the associated method, arguments |
groups |
vector of values defining groupings of cases to keep together when folds are constructed for cross-validation [default: none]. |
strata |
vector of values to use in conducting stratified resample estimation of model performance [default: none]. |
weights |
numeric vector of non-negative case weights for the |
na.rm |
character string or logical specifying removal of |
x, y |
matrix and object containing predictor and response variables. |
offsets |
numeric vector, matrix, or data frame of values to be added with a fixed coefficient of 1 to linear predictors in compatible regression models. |
ModelFrame
class object that inherits from data.frame
.
fit
, resample
, response
,
SelectedInput
## Requires prior installation of suggested package gbm to run mf <- ModelFrame(ncases / (ncases + ncontrols) ~ agegp + tobgp + alcgp, data = esoph, weights = ncases + ncontrols) gbm_fit <- fit(mf, model = GBMModel) varimp(gbm_fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.