- class lightgbm.Sequence[source]
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 # 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
With random access, data sampling does not need to go through all data.
With range data access, there’s no need to read all data into memory thus reduce memory usage.
New in version 3.3.0.
Default size of a batch.