variable.names.xgb.Booster: Get Features Names from Booster

View source: R/xgb.Booster.R

variable.names.xgb.BoosterR Documentation

Get Features Names from Booster

Description

Returns the feature / variable / column names from a fitted booster object, which are set automatically during the call to xgb.train() from the DMatrix names, or which can be set manually through setinfo().

If the object doesn't have feature names, will return NULL.

It is equivalent to calling getinfo(object, "feature_name").

Usage

## S3 method for class 'xgb.Booster'
variable.names(object, ...)

Arguments

object

An xgb.Booster object.

...

Not used.


xgboost documentation built on Dec. 3, 2025, 5:06 p.m.