setinfo {gpboost}R Documentation

Set information of an gpb.Dataset object

Description

Set one attribute of a gpb.Dataset

Usage

setinfo(dataset, ...)

## S3 method for class 'gpb.Dataset'
setinfo(dataset, name, info, ...)

Arguments

dataset

Object of class gpb.Dataset

...

other parameters

name

the name of the field to get

info

the specific field of information to set

Details

The name field can be one of the following:

Value

the dataset you passed in

the dataset you passed in

Examples


data(agaricus.train, package = "gpboost")
train <- agaricus.train
dtrain <- gpb.Dataset(train$data, label = train$label)
gpb.Dataset.construct(dtrain)

labels <- gpboost::getinfo(dtrain, "label")
gpboost::setinfo(dtrain, "label", 1 - labels)

labels2 <- gpboost::getinfo(dtrain, "label")
stopifnot(all.equal(labels2, 1 - labels))


[Package gpboost version 1.5.1.1 Index]