layer_gbm: Layer estimated using a gradient boosting model

Description Usage Arguments

View source: R/layer.R

Description

Adds a new layer to the hierarchical reserving model. This layer will be estimated using the gbm package.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
layer_gbm(
  obj,
  name,
  distribution,
  n.trees = 500,
  interaction.depth = 2,
  n.minobsinnode = 10,
  shrinkage = 0.1,
  bag.fraction = 0.5,
  cv.folds = 0,
  select_trees = "perf",
  filter = NULL,
  transformation = NULL
)

Arguments

obj

The hierarchical reserving model

name

Character, name of the layer. This name should match the variable name in the data set

distribution

distribution argument passed to gbm

n.trees

n.trees argument passed to gbm

interaction.depth

interaction.depth argument passed to gbm

n.minobsinnode

n.minobsinnode argument passed to gbm

shrinkage

shrinkage argument passed to gbm

bag.fraction

bag.fraction argument passed to gbm

select_trees

Character string specifying the method for selecting the optimal number of trees after fitting the gbm

  • "fixed": Use the number of trees specified in n.trees

  • "perf": Update the number of trees using gbm.perf

filter

Function with

  • input: Data set with same structure as the data passed to hirem

  • output: TRUE/FALSE vector with same length as the number of rows in the input data set.
    FALSE indicates that this layer is zero for the current record.

transformation

Object of class hirem_transformation specifying the transformation applied before modelling this layer.


jonascrevecoeur/hirem documentation built on Dec. 14, 2021, 3 p.m.