nrow,xgb.DMatrix-method

0th

Percentile

Number of xgb.DMatrix rows

nrow return the number of rows present in the xgb.DMatrix.

Usage
"nrow"(x)
Arguments
x
Object of class xgb.DMatrix
Aliases
  • nrow,xgb.DMatrix-method
Examples
data(agaricus.train, package='xgboost')
train <- agaricus.train
dtrain <- xgb.DMatrix(train$data, label=train$label)
stopifnot(nrow(dtrain) == nrow(train$data))
Documentation reproduced from package xgboost, version 0.4-4, License: Apache License (== 2.0) | file LICENSE

Community examples

Looks like there are no examples yet.