Learn R Programming

rtemis (version 0.79)

cartLite: Bare bones decision tree derived from rpart

Description

A super-stripped down decision tree for when space and performance are critical

Usage

cartLite(x, y, weights = NULL, minsplit = 2, minbucket = 1, cp = 0,
  maxcompete = 0, usesurrogate = 2, surrogatestyle = 0,
  maxdepth = 3, xval = 0, save.fitted = FALSE, trace = 0, ...)

Arguments

x

Numeric vector or matrix / data frame of features i.e. independent variables

y

Numeric vector of outcome, i.e. dependent variable

weights

Numeric vector: Weights for cases. For classification, weights takes precedence over ipw, therefore set weights = NULL if using ipw. Note: If weight are provided, ipw is not used. Leave NULL if setting ipw = TRUE. Default = NULL

minsplit

[gS] Integer: Minimum number of cases that must belong in a node before considering a split. Default = 2

minbucket

[gS] Integer: Minimum number of cases allowed in a child node. Default = round(minsplit/3)

cp

[gS] Float: Complexity threshold for allowing a split. Default = .01

maxdepth

[gS] Integer: Maximum depth of tree. Default = 20

save.fitted

Logical: If TRUE, save fitted values in output. Default = FALSE