A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tmlange/optRF below:

GitHub - tmlange/optRF

optRF: Optimising random forest stability by determining the optimal number of trees

The optRF package provides tools for optimizing the number of trees in a random forest to improve model stability and reproducibility. Since random forest is a non-deterministic method, variable importance and prediction results can vary between runs. The optRF package estimates the stability of random forest based on the number of trees and helps users determine the optimal number of trees required for reliable predictions and variable selection.

To install the optRF R package from CRAN, just run

install.packages("optRF")

R version >= 3.6 is required.
You can install the development version of optRF from GitHub using devtools with:

devtools::install_github("tmlange/optRF")

The optRF package includes the SNPdata data set for demonstration purposes. The two main functions are:

library(optRF)

# Load example data set
data(SNPdata)

# Optimise random forest for predicting the first column in SNPdata
result_optpred = opt_prediction(y = SNPdata[,1], X=SNPdata[,-1])
summary(result_optpred)

# Optimise random forest for calculating variable importance
result_optimp = opt_importance(y = SNPdata[,1], X=SNPdata[,-1]) 
summary(result_optimp)

For detailed examples and explanations, refer to the package vignettes:

If you use optRF in your research, please cite:
Lange, T.M., Gültas, M., Schmitt, A.O. & Heinrich, F. optRF: Optimising random forest stability by determining the optimal number of trees. BMC Bioinformatics 26, 95 (2025).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4