xgb.DMatrix

0th

Percentile

Contruct xgb.DMatrix object

Contruct xgb.DMatrix object from dense matrix, sparse matrix or local file (that was created previously by saving an xgb.DMatrix).

Usage
xgb.DMatrix(data, info = list(), missing = NA, ...)
Arguments
data

a matrix object, a dgCMatrix object or a character representing a filename

info

a list of information of the xgb.DMatrix object

missing

Missing is only used when input is dense matrix, pick a float value that represents missing value. Sometime a data use 0 or other extreme value to represents missing values.

...

other information to pass to info.

Aliases
  • xgb.DMatrix
Examples
# NOT RUN {
data(agaricus.train, package='xgboost')
train <- agaricus.train
dtrain <- xgb.DMatrix(train$data, label=train$label)
xgb.DMatrix.save(dtrain, 'xgb.DMatrix.data')
dtrain <- xgb.DMatrix('xgb.DMatrix.data')
# }
Documentation reproduced from package xgboost, version 0.6-4, License: Apache License (== 2.0) | file LICENSE

Community examples

Looks like there are no examples yet.