Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xgb.gblinear.history

Extract gblinear coefficients history.


Description

A helper function to extract the matrix of linear coefficients' history from a gblinear model created while using the cb.gblinear.history() callback.

Usage

xgb.gblinear.history(model, class_index = NULL)

Arguments

model

either an xgb.Booster or a result of xgb.cv(), trained using the cb.gblinear.history() callback.

class_index

zero-based class index to extract the coefficients for only that specific class in a multinomial multiclass model. When it is NULL, all the coefficients are returned. Has no effect in non-multiclass models.

Value

For an xgb.train result, a matrix (either dense or sparse) with the columns corresponding to iteration's coefficients (in the order as xgb.dump() would return) and the rows corresponding to boosting iterations.

For an xgb.cv result, a list of such matrices is returned with the elements corresponding to CV folds.


xgboost

Extreme Gradient Boosting

v1.4.1.1
Apache License (== 2.0) | file LICENSE
Authors
Tianqi Chen [aut], Tong He [aut, cre], Michael Benesty [aut], Vadim Khotilovich [aut], Yuan Tang [aut] (<https://orcid.org/0000-0001-5243-233X>), Hyunsu Cho [aut], Kailong Chen [aut], Rory Mitchell [aut], Ignacio Cano [aut], Tianyi Zhou [aut], Mu Li [aut], Junyuan Xie [aut], Min Lin [aut], Yifeng Geng [aut], Yutian Li [aut], XGBoost contributors [cph] (base XGBoost implementation)
Initial release
2021-04-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.