Skip to contents

Get DMatrix Data

Usage

xgb.get.DMatrix.data(dmat)

Arguments

dmat

An xgb.DMatrix object, as returned by xgb.DMatrix().

Value

The data held in the DMatrix, as a sparse CSR matrix (class dgRMatrix from package Matrix). If it had feature names, these will be added as column names in the output.