Learn R Programming

sits (version 1.4.0)

plot.xgb_model: Plot XGB model

Description

Plots the important variables in an extreme gradient boosting.

Usage

# S3 method for xgb_model
plot(x, ..., n_trees = 3)

Value

A plot object.

Arguments

x

Object of class "xgb_model".

...

Further specifications for plot.

n_trees

Number of trees to be plotted

Author

Gilberto Camara, gilberto.camara@inpe.br

Examples

Run this code
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 the model
    plot(xgb_model)
}

Run the code above in your browser using DataLab