gpb.model.dt.tree {gpboost}R Documentation

Parse a GPBoost model json dump

Description

Parse a GPBoost model json dump into a data.table structure.

Usage

gpb.model.dt.tree(model, num_iteration = NULL)

Arguments

model

object of class gpb.Booster

num_iteration

number of iterations you want to predict with. NULL or <= 0 means use best iteration

Value

A data.table with detailed information about model trees' nodes and leafs.

The columns of the data.table are:

Examples


data(agaricus.train, package = "gpboost")
train <- agaricus.train
dtrain <- gpb.Dataset(train$data, label = train$label)

params <- list(
  objective = "binary"
  , learning_rate = 0.01
  , num_leaves = 63L
  , max_depth = -1L
  , min_data_in_leaf = 1L
  , min_sum_hessian_in_leaf = 1.0
)
model <- gpb.train(params, dtrain, 10L)

tree_dt <- gpb.model.dt.tree(model)


[Package gpboost version 1.5.1.1 Index]