baggtree: For each bootstrap sample grow a projection pursuit tree...

View source: R/baggtree.R

baggtreeR Documentation

For each bootstrap sample grow a projection pursuit tree (PPtree object).

Description

For each bootstrap sample grow a projection pursuit tree (PPtree object).

Usage

baggtree(
  data,
  class,
  m = 500,
  PPmethod = "LDA",
  lambda = 0.1,
  size.p = 1,
  parallel = FALSE,
  cores = 2
)

Arguments

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. m = 500 is by default.

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

Value

data frame with trees_pp output for all the bootstraps samples.

Examples

#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)


PPforest documentation built on Sept. 10, 2022, 1:05 a.m.