Learn R Programming

rtemis (version 0.79)

addtreenow: rtemis internal: Low-level Additive Tree procedure

Description

Train an Additive Tree for Regression

Usage

addtreenow(x, y, max.depth = 5, alpha = 0, lambda = 1,
  lambda.seq = NULL, minobsinnode = 2, minobsinnode.lin = 10,
  learning.rate = 1, part.minsplit = 2, part.xval = 0,
  part.max.depth = 1, part.cp = 0, part.minbucket = 5,
  init = mean(y), lin.type = c("glmnet", "cv.glmnet", "lm.ridge",
  "glm"), cv.glmnet.nfolds = 5, cv.glmnet.lambda = "lambda.min",
  verbose = FALSE, trace = 0, n.cores = rtCores, ...)

Arguments

x

data.frame

y

Numeric vector of outcome, i.e. dependent variable

max.depth

Integer: Max depth of additive tree

lambda

Float: lambda parameter for MASS::lm.ridge Default = .01

minobsinnode

Integer: Minimum N observations needed in node, before considering splitting

part.max.depth

Integer: Max depth for each tree model within the additive tree

init

Initial value. Default = mean(y)

verbose

Logical: If TRUE, print summary to screen.

trace

Integer: If higher than 0, will print more information to the console. Default = 0

Details

Note that lambda is treated differently by glmnet::glmnet and MASS::lm.ridge