xgb.DMatrix {xgboost} R Documentation

Construct xgb.DMatrix object

Description


Construct xgb.DMatrix object from either a dense matrix,
a sparse matrix, or a local file. Supported input file
formats are either a libsvm text file or a binary file
that was created previously by xgb.DMatrix.save).

Usage

xgb.DMatrix(data,
    label = NULL,
    validate.set = FALSE,
    categorical.features = NULL,
    feature.names = NULL);

Arguments

data

a matrix object (either numeric or integer), a dgCMatrix object, or a character string representing a filename. [as dataframe]

label

labels for training data should be integer value. [as double]

Details

Authors

MLkit

Value

this function returns data object in these one of the listed data types: TrainData, TestData, ValidationData.

clr value class

Examples


[Package xgboost version 1.0.0.0 Index]