plot.xgb_model: Plot XGB model

View source: R/sits_plot.R

plot.xgb_modelR Documentation

Plot XGB model

Description

Plots trees in an extreme gradient boosting model.

Usage

## S3 method for class 'xgb_model'
plot(x, ..., tree_idx = 1)

Arguments

x

Object of class "xgb_model".

...

Further specifications for plot.

tree_idx

Number of tree to be plotted

Value

A plot

Author(s)

Gilberto Camara, gilberto.camara@inpe.br

Examples

if (sits_run_examples()) {
    # Retrieve the samples for Mato Grosso
    # train an extreme gradient boosting
    xgb_model <- sits_train(samples_modis_ndvi,
        ml_method = sits_xgboost()
    )
    plot(xgb_model)
}

sits documentation built on Jan. 14, 2026, 5:06 p.m.