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, ..., trees = c(0:4), width = 1500, height = 1900)

Arguments

x

Object of class "xgb_model".

...

Further specifications for plot.

trees

Vector of trees to be plotted

width

Width of the output window

height

Height of the output window

Value

A plot

Note

Please refer to the sits documentation available in <https://e-sensing.github.io/sitsbook/> for detailed examples.

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)
}

e-sensing/sits documentation built on Jan. 28, 2024, 6:05 a.m.