s_RuleFit | R Documentation |
Train a gradient boosting model, extract rules, and fit using LASSO
s_RuleFit(
x,
y = NULL,
x.test = NULL,
y.test = NULL,
gbm.params = list(list(n.trees = 300, bag.fraction = 1, shrinkage = 0.1,
interaction.depth = 3, ifw = TRUE)),
meta.alpha = 1,
meta.lambda = NULL,
meta.extra.params = list(ifw = TRUE),
cases.by.rules = NULL,
x.name = NULL,
y.name = NULL,
n.cores = rtCores,
question = NULL,
print.plot = FALSE,
plot.fitted = NULL,
plot.predicted = NULL,
plot.theme = rtTheme,
outdir = NULL,
save.mod = if (!is.null(outdir)) TRUE else FALSE,
verbose = TRUE
)
x |
Numeric vector or matrix / data frame of features i.e. independent variables |
y |
Numeric vector of outcome, i.e. dependent variable |
x.test |
Numeric vector or matrix / data frame of testing set features
Columns must correspond to columns in |
y.test |
Numeric vector of testing set outcome |
gbm.params |
List of named lists: A list, each element of which is a named list
of parameters for s_GBM. i.e. If you want to train a single GBM model, this could
be:
|
meta.alpha |
Float [0, 1]: |
meta.lambda |
Float: |
meta.extra.params |
Named list: Parameters for s_GLMNET for the feature selection step |
cases.by.rules |
Matrix of cases by rules from a previoue rulefit run. If provided, the GBM step is skipped. Default = NULL |
x.name |
Character: Name for feature set |
y.name |
Character: Name for outcome |
n.cores |
Integer: Number of cores to use |
question |
Character: the question you are attempting to answer with this model, in plain language. |
print.plot |
Logical: if TRUE, produce plot using |
plot.fitted |
Logical: if TRUE, plot True (y) vs Fitted |
plot.predicted |
Logical: if TRUE, plot True (y.test) vs Predicted.
Requires |
plot.theme |
Character: "zero", "dark", "box", "darkbox" |
outdir |
Character: If defined, save log, 'plot.all' plots (see above) and RDS file of complete output |
save.mod |
Logical: If TRUE, save all output to an RDS file in |
verbose |
Logical: If TRUE, print summary to screen. |
Based on "Predictive Learning via Rule Ensembles" by Friedman and Popescu http://statweb.stanford.edu/~jhf/ftp/RuleFit.pdf
rtMod
object
E.D. Gennatas
Friedman JH, Popescu BE, "Predictive Learning via Rule Ensembles", http://statweb.stanford.edu/~jhf/ftp/RuleFit.pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.