MonteCarloValidator<T, TInput, TOutput>
Models & Types ยท AiDotNet.CrossValidators
Implements a Monte Carlo cross-validation strategy for model evaluation.
Inheritance: CrossValidatorBase<T, TInput, TOutput> โ MonteCarloValidator<T, TInput, TOutput>
For Beginners
Monte Carlo cross-validation is like repeatedly shuffling and splitting your data to test your model.
What this class does:
- Randomly splits your data into training and validation sets
- Repeats this process multiple times (as specified in the options)
- For each split:
- Trains the model on the training set
- Evaluates the model on the validation set
- Calculates how well your model performs on average across all splits
This is useful because:
- It provides a robust estimate of model performance
- It helps to reduce the impact of how the data is split on the results
- It can be more flexible than k-fold cross-validation for certain types of data
However, it can be computationally expensive for a large number of iterations.
How It Works
This class provides a Monte Carlo cross-validation implementation, which randomly splits the data into training and validation sets multiple times.
Constructors
| Constructor | Summary |
|---|---|
MonteCarloValidator(MonteCarloValidationOptions options) |
Methods
| Method | Summary |
|---|---|
CrossValidationResult<T, TInput, TOutput> Validate(IFullModel<T, TInput, TOutput> model, TInput X, TOutput y, IOptimizer<T, TInput, TOutput> optimizer) |
Performs the Monte Carlo cross-validation process on the given model using the provided data and optimizer. |