baggtree | R Documentation |
For each bootstrap sample grow a projection pursuit tree (PPtree object).
baggtree( data, class, m = 500, PPmethod = "LDA", lambda = 0.1, size.p = 1, parallel = FALSE, cores = 2 )
data |
Data frame with the complete data set. |
class |
A character with the name of the class variable. |
m |
is the number of bootstrap replicates, this corresponds with the number of trees to grow. To ensure that each observation is predicted a few times we have to select this number no too small. |
PPmethod |
is the projection pursuit index to be optimized, options LDA or PDA, by default it is LDA. |
lambda |
a parameter for PDA index |
size.p |
proportion of random sample variables in each split. |
parallel |
logical condition, if it is TRUE then parallelize the function |
cores |
number of cores used in the parallelization |
data frame with trees_pp output for all the bootstraps samples.
#crab data set crab.trees <- baggtree(data = crab, class = 'Type', m = 200, PPmethod = 'LDA', lambda = .1, size.p = 0.5 , parallel = TRUE, cores = 2) str(crab.trees, max.level = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.