PredefinedSplitter<T>
Models & Types · AiDotNet.Preprocessing.DataPreparation.Splitting.GroupBased
User-specified split where indices for train/test are provided directly.
Inheritance: DataSplitterBase<T> → PredefinedSplitter<T>
For Beginners
Sometimes you know exactly which samples should go where. This splitter lets you specify the exact indices for training, testing, and optionally validation.
How It Works
When to Use:
- Reproducing a specific published split
- Domain-specific splitting requirements
- When automatic splitting isn’t appropriate
Constructors
| Constructor | Summary |
|---|---|
PredefinedSplitter(int[] trainIndices, int[] testIndices, int[] validationIndices) |
Creates a new predefined splitter with specific indices. |
Properties
| Property | Summary |
|---|---|
bool SupportsValidation { get; } |
|
string Description { get; } |
Methods
| Method | Summary |
|---|---|
DataSplitResult<T> Split(Matrix<T> X, Vector<T> y) |