View source: R/boostmtree_control.R
| boostmtree.control | R Documentation |
boostmtreeConstruct a control object used by boostmtree() to manage resampling,
split search, reproducibility, and a few advanced fitting options.
boostmtree.control(
ntree = 1,
bootstrap = "by.root",
bootstrap.fraction = 0.632,
sample.matrix = NULL,
nsplit = NULL,
samptype = "swor",
xvar.wt = NULL,
case.wt = NULL,
seed = NULL,
cv.lambda = FALSE,
cv.rho = TRUE
)
ntree |
Number of trees requested. The current implementation
supports |
bootstrap |
Resampling rule passed to the underlying tree learner.
Recognized values are |
bootstrap.fraction |
Sampling fraction used to build the in-bag sample
when |
sample.matrix |
Optional user-supplied in-bag sampling matrix with
dimensions |
nsplit |
Optional limit on the number of candidate split points examined at each node. Smaller values can reduce computation. |
samptype |
Sampling type passed to the underlying tree learner. |
xvar.wt |
Optional split-variable weights. |
case.wt |
Optional case weights. |
seed |
Optional integer seed used to reproduce the random parts of tree fitting. This affects reproducibility only; it does not turn out-of-bag sampling on or off. |
cv.lambda |
Logical; should the CV path use the cross-validated mean when
updating |
cv.rho |
Logical; should the CV path use the cross-validated mean when
updating |
The control object separates routine model arguments such as M,
k, and nu from lower-level options that control how the
tree base learner is grown.
The most important option is bootstrap. In this package, out-of-bag
subjects are used for the cross-validation path stored when
cv.flag = TRUE, and for grow-object variable importance returned by
vimp.boostmtree(). The default bootstrap = "by.root" is therefore
usually the right choice. Setting bootstrap = "none" disables OOB
sampling. That can be useful for deterministic in-bag fits and for workflows
that rely on a separate held-out test set, but it is not suitable for OOB CV.
When cv.flag = TRUE, boostmtree() checks the requested control
object before fitting. If the requested resampling rule would yield no
out-of-bag subjects, the fit is adjusted back to the default OOB rule or the
function stops with a clear message when a user-supplied sampling matrix is not
compatible with OOB CV.
An object of class "boostmtree.control".
boostmtree
## Default OOB-producing control object.
boostmtree.control(seed = 7)
## Deterministic in-bag fitting with no OOB subjects.
boostmtree.control(bootstrap = "none", seed = 7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.