tuneNTREE: Tuning of the ntree parameter (i.e. the number of trees) for...

Description Usage Arguments Value Author(s) Examples

Description

This function tries to find the 'optimal' value for the parameter ntree which indicates the number of trees used to grow the ensemble of trees. To do that it will build several random forest models with a different number of trees for the mtry value considered. The number of models built for each ntree value will be equal to the parameter iteration. The oob errors of each random forest model, computed for each ntree value will be arranged in a matrix.

Usage

1
2
tuneNTREE(data, mtry, iterations, minNTREE = 500, pace = 100,
  seq_length = 5)

Arguments

data

the n x p dataframe used to build the Random Forest models. The first two columns must represent respectively the sample names and the class labels associated to each sample

mtry

the chosen mtry value

iterations

the number of Random Forest models to be built for each value of ntree

minNTREE

the minimum number of trees of each random forest model.

pace

the pace between each value of ntree to be tested

seq_length

the number of ntree values to be tested

Value

a n x p matrix in which n is the number of models considered and p is the number of ntree values tested. Each column represents the oob errors resulting from each model and corresponding to the different ntree values

Author(s)

Piergiorgio Palla

Examples

1
2
## data(cachexiaData)
## res <- tuneNTREE(cachexiaData, 8, iterations = 50, minNTREE = 600, pace = 100, seq_length = 10)

Example output

Loading required package: AUCRF
Loading required package: randomForest
randomForest 4.6-14
Type rfNews() to see new features/changes/bug fixes.
AUCRF 1.1

Attaching package: 'RFmarkerDetector'

The following object is masked from 'package:stats':

    screeplot

RFmarkerDetector documentation built on May 2, 2019, 3:42 p.m.