OutOfDistributionSplitter<T>
Models & Types · AiDotNet.Preprocessing.DataPreparation.Splitting.Specialized
Out-of-Distribution (OOD) splitter that places outlier samples in the test set.
Inheritance: DataSplitterBase<T> → OutOfDistributionSplitter<T>
For Beginners
This splitter identifies samples that are “unusual” or “outliers” compared to the bulk of the data, and places them in the test set. This helps evaluate how well your model handles edge cases.
How It Works
How It Works:
- Compute the centroid (average) of all samples
- Calculate each sample’s distance from the centroid
- Place the most distant samples (outliers) in the test set
When to Use:
- Testing model robustness to unusual inputs
- Evaluating edge case handling
- Safety-critical applications where OOD detection matters
Constructors
| Constructor | Summary |
|---|---|
OutOfDistributionSplitter(double testSize, double oodPercentile, int randomSeed) |
Creates a new Out-of-Distribution splitter. |
Properties
| Property | Summary |
|---|---|
string Description { get; } |
Methods
| Method | Summary |
|---|---|
DataSplitResult<T> Split(Matrix<T> X, Vector<T> y) |