s_LINOA | R Documentation |
Train a Linear Optimized Additive Tree
s_LINOA(
x,
y = NULL,
x.test = NULL,
y.test = NULL,
weights = NULL,
ifw = TRUE,
ifw.type = 2,
upsample = FALSE,
downsample = FALSE,
resample.seed = NULL,
max.leaves = 8,
learning.rate = 0.5,
select.leaves.smooth = TRUE,
force.max.leaves = NULL,
lookback = TRUE,
gamma = 0,
n.quantiles = 20,
minobsinnode = NULL,
minbucket = NULL,
lin.type = c("forwardStepwise", "glmnet", "cv.glmnet", "lm.ridge", "allSubsets",
"backwardStepwise", "glm", "solve", "none"),
alpha = 1,
lambda = 0.05,
lambda.seq = NULL,
cv.glmnet.nfolds = 5,
which.cv.glmnet.lambda = "lambda.min",
nbest = 1,
nvmax = 3,
.rho = TRUE,
rho.max = 1000,
init = NULL,
metric = "auto",
maximize = NULL,
grid.resample.params = setup.resample("kfold", 5),
gridsearch.type = "exhaustive",
save.gridrun = FALSE,
grid.verbose = verbose,
keep.x = FALSE,
simplify = TRUE,
cxrcoef = FALSE,
n.cores = rtCores,
splitline.cores = 1,
.preprocess = NULL,
plot.tuning = TRUE,
verbose.predict = FALSE,
x.name = NULL,
y.name = NULL,
question = NULL,
outdir = NULL,
print.plot = FALSE,
plot.fitted = NULL,
plot.predicted = NULL,
plot.theme = rtTheme,
save.mod = FALSE,
.gs = FALSE,
verbose = TRUE,
trace = 1
)
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 |
weights |
Numeric vector: Weights for cases. For classification, |
ifw |
Logical: If TRUE, apply inverse frequency weighting
(for Classification only).
Note: If |
ifw.type |
Integer 0, 1, 2 1: class.weights as in 0, divided by min(class.weights) 2: class.weights as in 0, divided by max(class.weights) |
upsample |
Logical: If TRUE, upsample cases to balance outcome classes (for Classification only) Note: upsample will randomly sample with replacement if the length of the majority class is more than double the length of the class you are upsampling, thereby introducing randomness |
downsample |
Logical: If TRUE, downsample majority class to match size of minority class |
resample.seed |
Integer: If provided, will be used to set the seed during upsampling. Default = NULL (random seed) |
max.leaves |
Integer: Maximum number of terminal nodes to grow |
lookback |
Logical: If TRUE, check validation error to decide when to stop growing tree. Default = FALSE |
minobsinnode |
Integer: Minimum N observations needed in node, before considering splitting |
lambda |
Float: lambda parameter for |
nvmax |
[gS] Integer: Number of max features to use for lin.type "allSubsets", "forwardStepwise", or
"backwardStepwise". If values greater than n of features in |
init |
Initial value. Default = |
plot.tuning |
Logical: If TRUE, plot validation error during gridsearch |
x.name |
Character: Name for feature set |
y.name |
Character: Name for outcome |
question |
Character: the question you are attempting to answer with this model, in plain language. |
outdir |
Path to output directory.
If defined, will save Predicted vs. True plot, if available,
as well as full model output, if |
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" |
save.mod |
Logical: If TRUE, save all output to an RDS file in |
.gs |
internal use only |
verbose |
Logical: If TRUE, print summary to screen. |
trace |
Integer: If higher than 0, will print more information to the console. |
The Linear Optimized Additive Tree grows a tree by finding splits that minimize loss after linear
models are fit on each child.
We specify an upper threshold of leaves using max.leaves
instead of directly defining a number,
because depending on the other parameters and the datasets, splitting may stop early.
E.D. Gennatas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.