CrossValidationResult<T, TInput, TOutput>

Models & Types · AiDotNet.Models.Results

Aggregates results from all folds in a cross-validation procedure.

For Beginners

Cross-validation helps you understand how well your model will perform on new data by testing it on several different train/test splits. This class combines the results from all those tests to give you an overall picture of your model’s performance.

Constructors

Constructor Summary
CrossValidationResult(List<FoldResult<T, TInput, TOutput>> foldResults, TimeSpan totalTime) Creates a new instance of the CrossValidationResult class.

Properties

Property Summary
BasicStats<T> AdjustedRandIndexStats { get; } Gets basic statistics for Adjusted Rand Index values across folds, or null if not applicable.
BasicStats<T> CalinskiHarabaszIndexStats { get; } Gets basic statistics for Calinski-Harabasz Index values across folds, or null if not applicable.
BasicStats<T> DaviesBouldinIndexStats { get; } Gets basic statistics for Davies-Bouldin Index values across folds, or null if not applicable.
BasicStats<T> MAEStats { get; } Gets basic statistics for MAE values across folds.
BasicStats<T> R2Stats { get; } Gets basic statistics (mean, standard deviation, etc.) for R² values across folds.
BasicStats<T> RMSEStats { get; } Gets basic statistics for RMSE values across folds.
BasicStats<T> SilhouetteScoreStats { get; } Gets basic statistics for Silhouette Score values across folds, or null if not applicable.
Dictionary<string, BasicStats<T>> FeatureImportanceStats { get; } Gets a dictionary of feature importance scores aggregated across all folds.
List<FoldResult<T, TInput, TOutput>> FoldResults { get; } Gets the individual results for each fold.
TimeSpan AverageTrainingTime { get; } Gets the average time taken to train the model across all folds.
TimeSpan TotalTime { get; } Gets the total time taken for the entire cross-validation process.
int FoldCount { get; } Gets the number of folds used in cross-validation.

Methods

Method Summary
BasicStats<T> GetMetricStats(MetricType metricType) Gets summary statistics for a specific metric across all folds.
string GenerateReport() Generates a comprehensive summary report of the cross-validation results.