DataSplitResult<T>
Models & Types · AiDotNet.Preprocessing.DataPreparation
Contains the results of a data split operation for Matrix/Vector data.
For Beginners
After splitting your data, this class holds all the pieces:
- Training data (XTrain, yTrain): What your model learns from
- Test data (XTest, yTest): What you evaluate your model on
- Validation data (XValidation, yValidation): Optional, for hyperparameter tuning
- Indices: Which rows from the original data ended up in each set
How It Works
Why Track Indices? Knowing which original samples are in each set is useful for:
- Debugging: “Why did my model get sample #42 wrong?”
- Analysis: Comparing predictions to original data
- Reproducibility: Recording exactly how data was split
Constructors
| Constructor | Summary |
|---|---|
DataSplitResult() |
Properties
| Property | Summary |
|---|---|
Matrix<T> XTest { get; set; } |
Gets the feature matrix for testing. |
Matrix<T> XTrain { get; set; } |
Gets the feature matrix for training. |
Matrix<T> XValidation { get; set; } |
Gets the feature matrix for validation (optional three-way split). |
Vector<T> yTest { get; set; } |
Gets the target vector for testing (null for unsupervised learning). |
Vector<T> yTrain { get; set; } |
Gets the target vector for training (null for unsupervised learning). |
Vector<T> yValidation { get; set; } |
Gets the target vector for validation (optional three-way split). |
bool HasValidationSet { get; } |
Gets whether this result includes a validation set. |
int? FoldIndex { get; set; } |
Gets the fold index for cross-validation methods (0-based). |
int? RepeatIndex { get; set; } |
Gets the repeat index for repeated cross-validation methods (0-based). |
int? TotalFolds { get; set; } |
Gets the total number of folds for cross-validation methods. |
int? TotalRepeats { get; set; } |
Gets the total number of repeats for repeated cross-validation methods. |
int[] TestIndices { get; set; } |
Gets the indices of rows from the original data that are in the test set. |
int[] TrainIndices { get; set; } |
Gets the indices of rows from the original data that are in the training set. |
int[] ValidationIndices { get; set; } |
Gets the indices of rows from the original data that are in the validation set (optional). |
Methods
| Method | Summary |
|---|---|
string GetSummary() |
Gets a human-readable summary of this split result. |