CrossValidationOptions

Options & Configuration · AiDotNet.Evaluation.Options

Configuration options for cross-validation.

For Beginners

Cross-validation helps you understand how well your model will perform on new, unseen data. Instead of a single train/test split, it creates multiple splits and averages the results for a more reliable estimate.

How It Works

Cross-validation provides robust performance estimates by training and testing on different subsets of data. These options control the validation strategy.

Constructors

Constructor Summary
CrossValidationOptions()

Properties

Property Summary
CrossValidationOptions InnerCVOptions { get; set; } Inner CV options for nested cross-validation.
CrossValidationStrategy? Strategy { get; set; } Cross-validation strategy to use.
bool? ComputeFoldVariance { get; set; } Whether to compute per-fold variance.
bool? ParallelExecution { get; set; } Whether to run folds in parallel.
bool? ReturnPredictions { get; set; } Whether to return predictions from each fold.
bool? ReturnTrainedModels { get; set; } Whether to return trained models from each fold.
bool? Shuffle { get; set; } Whether to shuffle data before splitting.
bool? UseOutOfFoldPredictions { get; set; } Whether to use out-of-fold predictions for evaluation.
double? TestSize { get; set; } Test size ratio for shuffle split strategies.
int? EmbargoPeriod { get; set; } Embargo period for combinatorial purged CV.
int? Gap { get; set; } Gap between train and test sets for time series CV.
int? GroupColumnIndex { get; set; } Group column/feature index for group-aware CV.
int? LeavePOutSamples { get; set; } Number of samples to leave out for leave-P-out CV.
int? MaxDegreeOfParallelism { get; set; } Maximum degree of parallelism.
int? MaxTrainSize { get; set; } Maximum training size for time series CV.
int? MinTrainSize { get; set; } Minimum training size required.
int? NumberOfFolds { get; set; } Number of folds (K).
int? NumberOfRepeats { get; set; } Number of repetitions for repeated CV.
int? PurgePeriod { get; set; } Purge period for purged K-fold (financial CV).
int? RandomSeed { get; set; } Random seed for reproducibility.
int? StepSize { get; set; } Step size for sliding window CV.
int? WindowSize { get; set; } Window size for sliding window CV.
int[] GroupLabels { get; set; } Group labels array for group-aware CV.