xgboost (version 0.3-0)

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

Description

Save xgb.DMatrix object to binary file

Usage

xgb.DMatrix.save(DMatrix, fname)

Arguments

DMatrix
the model object.
fname
the name of the binary file.

Examples

Run this code
data(iris)
iris[,5] <- as.numeric(iris[,5])
dtrain <- xgb.DMatrix(as.matrix(iris[,1:4]), label=iris[,5])
xgb.DMatrix.save(dtrain, 'iris.xgb.DMatrix')
dtrain <- xgb.DMatrix('iris.xgb.DMatrix')

Run the code above in your browser using DataCamp Workspace