R: Construct validation data

lgb.Dataset.create.valid {lightgbm} | R Documentation

## Construct validation data

### Description

Construct validation data according to training data

### Usage

    lgb.Dataset.create.valid(dataset, data, info = list(), ...)

### Arguments

`dataset` | `lgb.Dataset` object, training data
`data` | a `matrix` object, a `dgCMatrix` object or a character representing a filename
`info` | a list of information of the `lgb.Dataset` object
`...` | other information to pass to `info`.

### Value

constructed dataset

### Examples

    library(lightgbm)
    data(agaricus.train, package = "lightgbm")
    train <- agaricus.train
    dtrain <- lgb.Dataset(train$data, label = train$label)
    data(agaricus.test, package = "lightgbm")
    test <- agaricus.test
    dtest <- lgb.Dataset.create.valid(dtrain, test$data, label = test$label)

[Package lightgbm version 2.3.1 Index]