gpb.Dataset {gpboost} | R Documentation |
Construct gpb.Dataset
object
Description
Construct gpb.Dataset
object from dense matrix, sparse matrix
or local file (that was created previously by saving an gpb.Dataset
).
Usage
gpb.Dataset(data, params = list(), reference = NULL, colnames = NULL,
categorical_feature = NULL, free_raw_data = FALSE, info = list(), ...)
Arguments
data |
a |
params |
a list of parameters. See the "Dataset Parameters" section of the parameter documentation for a list of parameters and valid values. |
reference |
reference dataset. When GPBoost creates a Dataset, it does some preprocessing like binning
continuous features into histograms. If you want to apply the same bin boundaries from an existing
dataset to new |
colnames |
names of columns |
categorical_feature |
categorical features. This can either be a character vector of feature
names or an integer vector with the indices of the features (e.g.
|
free_raw_data |
GPBoost constructs its data format, called a "Dataset", from tabular data.
By default, this Dataset object on the R side does keep a copy of the raw data.
If you set |
info |
a list of information of the |
... |
other information to pass to |
Value
constructed dataset
Examples
data(agaricus.train, package = "gpboost")
train <- agaricus.train
dtrain <- gpb.Dataset(train$data, label = train$label)
data_file <- tempfile(fileext = ".data")
gpb.Dataset.save(dtrain, data_file)
dtrain <- gpb.Dataset(data_file)
gpb.Dataset.construct(dtrain)