R: Save 'lgb.Dataset' to a binary file

lgb.Dataset.save {lightgbm} | R Documentation

## Save `lgb.Dataset` to a binary file

### Description

Save `lgb.Dataset` to a binary file

### Usage

    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")

[Package lightgbm version 2.2.2 Index]