lightgbm.Sequence
- 类 lightgbm.Sequence[source]
- Bases: - ABC- 通用数据访问接口。 - 对象应支持以下操作 - # 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 - 具备随机访问能力,数据采样无需遍历所有数据。 
- 具备范围数据访问能力,无需将所有数据读入内存,从而减少内存使用。 
 - 版本 3.3.0 新增。 - batch_size
- 批次的默认大小。 - 类型:
- int 
 
 - __init__()
 - 方法 - __init__()- 属性