gpb.Dataset.set.categorical | R Documentation |
gpb.Dataset
Set the categorical features of an gpb.Dataset
object. Use this function
to tell GPBoost which features should be treated as categorical.
gpb.Dataset.set.categorical(dataset, categorical_feature)
dataset |
object of class |
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.
|
the dataset you passed in
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.set.categorical(dtrain, 1L:2L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.