slice | R Documentation |
Get a new gpb.Dataset
containing the specified rows of
original gpb.Dataset
object
slice(dataset, ...)
## S3 method for class 'gpb.Dataset'
slice(dataset, idxset, ...)
dataset |
Object of class |
... |
other parameters (currently not used) |
idxset |
an integer vector of indices of rows needed |
constructed sub dataset
data(agaricus.train, package = "gpboost")
train <- agaricus.train
dtrain <- gpb.Dataset(train$data, label = train$label)
dsub <- gpboost::slice(dtrain, seq_len(42L))
gpb.Dataset.construct(dsub)
labels <- gpboost::getinfo(dsub, "label")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.