lightgbm.Sequence — LightGBM 4.6.0.99 documentation (original) (raw)

class lightgbm.Sequence[source]

Bases: ABC

Generic data access interface.

Object should support the following operations:

Get total row number.

len(seq)

Random access by row index. Used for data sampling.

seq[10]

Range data access. Used to read data in batch when constructing Dataset.

seq[0:100]

Optionally specify batch_size to control range data read size.

seq.batch_size

Added in version 3.3.0.

batch_size

Default size of a batch.

Type:

int

__init__()

Methods

Attributes