GroupShuffleSplitter<T>
Models & Types ยท AiDotNet.Preprocessing.DataPreparation.Splitting.GroupBased
Random group-based train/test splits (Monte Carlo with groups).
Inheritance: DataSplitterBase<T> โ GroupShuffleSplitter<T>
For Beginners
This is like ShuffleSplitter, but respects group boundaries. Groups are randomly assigned to train or test, keeping all samples from the same group together.
How It Works
When to Use:
- When you want multiple random evaluations
- But need to keep groups together
- Good for getting variance estimates of group-based evaluation
Constructors
| Constructor | Summary |
|---|---|
GroupShuffleSplitter(int[] groups, int nSplits, double testSize, int randomSeed) |
Creates a new Group Shuffle splitter. |
Properties
| Property | Summary |
|---|---|
int NumSplits { get; } |
|
string Description { get; } |
Methods
| Method | Summary |
|---|---|
DataSplitResult<T> Split(Matrix<T> X, Vector<T> y) |
|
IEnumerable<DataSplitResult<T>> GetSplits(Matrix<T> X, Vector<T> y) |