xgb.DMatrix.save: Save xgb.DMatrix object to binary file

View source: R/xgb.DMatrix.save.R

xgb.DMatrix.saveR Documentation

Save xgb.DMatrix object to binary file

Description

Save xgb.DMatrix object to binary file

Usage

xgb.DMatrix.save(dmatrix, fname)

Arguments

dmatrix

the xgb.DMatrix object

fname

the name of the file to write.

Examples

data(agaricus.train, package='xgboost')
dtrain <- with(agaricus.train, xgb.DMatrix(data, label = label, nthread = 2))
xgb.DMatrix.save(dtrain, 'xgb.DMatrix.data')
dtrain <- xgb.DMatrix('xgb.DMatrix.data')
if (file.exists('xgb.DMatrix.data')) file.remove('xgb.DMatrix.data')

xgboost documentation built on Sept. 11, 2024, 8:26 p.m.