estimate_numtrees {optRF}R Documentation

Estimate the required number of trees

Description

Estimate the number of trees required to achieve certain stability of random forest

Usage

estimate_numtrees(
  optRF_object,
  measure = c("selection", "importance", "prediction"),
  for_stability = 0.95
)

Arguments

optRF_object

An optRF_object, either the result from the opt_importance or the opt_prediction function.

measure

A character string indicating which stability measure is to be analysed. One of "selection" (default, analyses selection stability), "prediction" (analyses prediction stability) or "importance" (analyses variable importance stability).

for_stability

Either a single stability value or a vector containing multiple stability values for which the number of trees should be estimated.

Value

A data frame summarising the estimated stability and run time in seconds for the given num.trees values.

Examples

## Not run: 
data(SNPdata)
set.seed(123)
result_optpred = opt_prediction(y = SNPdata[,1], X=SNPdata[,-1]) # optimise random forest
estimate_numtrees(result_optpred, measure="prediction", for_stability=0.95)

## End(Not run)


[Package optRF version 1.2.1 Index]