Please note that init_score is not saved in binary file. If you need it, please set it again after loading Dataset.

lgb.Dataset.save(dataset, fname)

Arguments

dataset

object of class lgb.Dataset

fname

object filename of output file

Value

passed dataset

Examples

library(lightgbm) data(agaricus.train, package = "lightgbm") train <- agaricus.train dtrain <- lgb.Dataset(train$data, label = train$label) lgb.Dataset.save(dtrain, "data.bin")