training_params: Training parameters

View source: R/training-params.r

training_paramsR Documentation

Training parameters

Description

Class that contains the training parameters for the gbm model

Usage

training_params(
  num_trees = 100,
  interaction_depth = 1,
  min_num_obs_in_node = 10,
  shrinkage = 0.001,
  bag_fraction = 0.5,
  num_train = (2 * min_num_obs_in_node + 1)/bag_fraction + 1,
  id = seq_len(num_train),
  num_features = 1
)

Arguments

num_trees

Number of trees used in the fit.

interaction_depth

Maximum depth of each tree

min_num_obs_in_node

Minimum number of observations each node in a tree must have.

shrinkage

shrinkage parameter applied to each tree in the expansion. Also known as the learning rate or step-size reduction.

bag_fraction

fraction of independent training observations selected to create the next tree in the expansion. Introduces randomness in the model fit; if bag_fraction < 1 then running the same model twice will result in similar but different fits.

num_train

number of obs of data used in training the model. This defaults to the minimum number of observations allowed - (2*min_num_obs_in_node + 1)/bag_fraction + 1.

id

optional vector of integers, specifying which rows in the data correspond to which observations. Individual observations may have many rows of data associated with them. This defaults to seq_len(num_train). NB: When calling gbmt or gbmt_fit the id should be the default.

num_features

number of random features/columns to use in training model. This defaults to 1.

Value

training parameters object

Author(s)

James Hickey


gbm-developers/gbm3 documentation built on April 28, 2024, 10:04 p.m.