Implementation in Julia

Random forests are available in the Julia-registered packages from Kenta Sato:

Pkg.update() Pkg.add("RandomForests") 

This is a CART-based random forest implementation in Julia. This package supports:

  • Classification models
  • Regression models
  • Out-of-bag (OOB) errors
  • Feature importances
  • Various configurable parameters

There are two separate models available in this package:

  • Classification
  • Regression

Each model has its own constructor that is trained by applying the fit method. We can configure these constructors with some keyword arguments listed as follows:

RandomForestClassifier(;n_estimators::Int=10, 
                        max_features::Union(Integer, FloatingPoint, Symbol)=:sqrt, 
                        max_depth=nothing, 
                        min_samples_split::Int=2, 
                        criterion::Symbol=:gini) 

Get Julia for Data Science now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.