max_mtry_formula: Determine largest value of mtry from formula. This function...

View source: R/partykit.R

max_mtry_formulaR Documentation

Determine largest value of mtry from formula. This function potentially caps the value of mtry based on a formula and data set. This is a safe approach for survival and/or multivariate models.

Description

Determine largest value of mtry from formula. This function potentially caps the value of mtry based on a formula and data set. This is a safe approach for survival and/or multivariate models.

Usage

max_mtry_formula(mtry, formula, data)

Arguments

mtry

An initial value of mtry (which may be too large).

formula

A model formula.

data

The training set (data frame).

Value

A value for mtry.

Examples


# should be 9
max_mtry_formula(200, cbind(wt, mpg) ~ ., data = mtcars)


parsnip documentation built on June 24, 2024, 5:14 p.m.