Learn R Programming

PPforest (version 0.2.0)

baggtree: 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,
  y,
  m = 500,
  PPmethod = "LDA",
  lambda = 0.1,
  size.p = 1,
  parallel = FALSE,
  cores = 2
)

Value

data frame with trees_pp output for all the bootstraps samples.

Arguments

data

Data frame with the complete data set.

y

A character with the name of the y 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 if size.p= 1 it is bagging and if size.p<1 it is a forest.

parallel

logical condition, if it is TRUE then parallelize the function

cores

number of cores used in the parallelization