Interface IBatchSampler
- Namespace
- AiDotNet.Interfaces
- Assembly
- AiDotNet.dll
Extended interface for samplers that support batch-level sampling.
public interface IBatchSampler : IDataSampler
- Inherited Members
Remarks
Some samplers need to operate at the batch level rather than sample level, for example to ensure each batch contains samples from all classes (stratified batching).
Properties
BatchSize
Gets or sets the batch size for batch-level sampling.
int BatchSize { get; set; }
Property Value
DropLast
Gets or sets whether to drop the last incomplete batch.
bool DropLast { get; set; }
Property Value
Methods
GetBatchIndices()
Returns an enumerable of index arrays, where each array represents one batch.
IEnumerable<int[]> GetBatchIndices()
Returns
- IEnumerable<int[]>
An enumerable of batch index arrays.