tl_fit_forest: Fit a random forest model

View source: R/supervised-trees.R

tl_fit_forestR Documentation

Fit a random forest model

Description

Fit a random forest model

Usage

tl_fit_forest(
  data,
  formula,
  is_classification = FALSE,
  ntree = 500,
  mtry = NULL,
  importance = TRUE,
  ...
)

Arguments

data

A data frame containing the training data

formula

A formula specifying the model

is_classification

Logical indicating if this is a classification problem

ntree

Number of trees to grow (default: 500)

mtry

Number of variables randomly sampled at each split

importance

Whether to compute variable importance (default: TRUE)

...

Additional arguments to pass to randomForest()

Value

A fitted random forest model


tidylearn documentation built on Feb. 6, 2026, 5:07 p.m.