Interface IShuffleable
- Namespace
- AiDotNet.Interfaces
- Assembly
- AiDotNet.dll
Defines capability to shuffle data for randomized iteration.
public interface IShuffleable
Remarks
Data loaders that implement this interface can shuffle their data, which is important for training to prevent the model from learning the order of examples rather than the patterns in the data.
For Beginners: Shuffling is like shuffling a deck of cards before dealing. When training, you don't want your model to learn "cat images always come first, then dog images" - you want it to learn actual features. Shuffling ensures each epoch sees data in a different order.
Properties
IsShuffled
Gets whether the data is currently shuffled.
bool IsShuffled { get; }
Property Value
Methods
Shuffle(int?)
Shuffles the data order using the specified seed for reproducibility.
void Shuffle(int? seed = null)
Parameters
seedint?Optional seed for reproducible shuffling. Same seed produces same order.
Remarks
For Beginners: The seed is like a "recipe" for the randomness. Using the same seed gives the same "random" order every time, which is useful for reproducing experiments or debugging.
Unshuffle()
Restores the original (unshuffled) data order.
void Unshuffle()