Dimensions of an lgb.Dataset
Returns a vector of numbers of rows and of columns in an lgb.Dataset
.
## S3 method for class 'lgb.Dataset' dim(x, ...)
x |
Object of class |
... |
other parameters |
Note: since nrow
and ncol
internally use dim
, they can also
be directly used with an lgb.Dataset
object.
a vector of numbers of rows and of columns
data(agaricus.train, package = "lightgbm") train <- agaricus.train dtrain <- lgb.Dataset(train$data, label = train$label) stopifnot(nrow(dtrain) == nrow(train$data)) stopifnot(ncol(dtrain) == ncol(train$data)) stopifnot(all(dim(dtrain) == dim(train$data)))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.