rpartforest: Build a random forest with base learners grown from rpart

Description Usage Arguments Value Author(s)

View source: R/rpartforest.R

Description

This is a rudimentary implementation of Random Forest using rpart. It primarily serves as a proof of concept to utilize the "treelm" function to enable the representation of a Random Forest as a collection of linear model design matrices

Usage

1
2
3
4
5
6
7
8
9
rpartforest(
  y,
  x,
  test,
  mtry,
  ntrees,
  getlm = F,
  contrl = rpart.control(minsplit = 5, minbucket = 1, cp = 0.001)
)

Arguments

y
  • outcome variable

x
  • explanatory covariates

test
  • testing data

mtry
  • mtry tuning parameter

ntrees
  • number of trees within the forest

getlm
  • boolean to indicate whether linear model representation should be computed

contrl-

control parameters for rpart; refer to that documentation for details

Value

A matrix of predicted values from each base learner as well as ANOVA matrices encoding the training and testing data

Author(s)

Ian Frankenburg


ian-frankenburg/treeLM documentation built on Dec. 16, 2020, 4:25 a.m.