View source: R/xgb.DMatrix.save.R
xgb.DMatrix.save | R Documentation |
Save xgb.DMatrix object to binary file
xgb.DMatrix.save(dmatrix, fname)
dmatrix |
the |
fname |
the name of the file to write. |
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.