DatasetStatistics<T>
Models & Types · AiDotNet.Evaluation.Results.Core
Statistics about the dataset used for evaluation.
For Beginners
Before trusting evaluation metrics, you need to understand your data. This class tells you:
- How many samples were evaluated
- Class distribution (for classification) - are classes balanced?
- Target variable statistics (for regression) - range and spread
- Missing values, outliers, and other data quality issues
How It Works
Contains summary information about the evaluation dataset including sample counts, class distributions, feature statistics, and data quality indicators.
Constructors
| Constructor | Summary |
|---|---|
DatasetStatistics() |
Properties
| Property | Summary |
|---|---|
IReadOnlyDictionary<T, double> ClassProportions { get; set; } |
Proportion of samples per class. |
IReadOnlyDictionary<T, int> ClassCounts { get; set; } |
Number of samples per class. |
IReadOnlyList<FeatureStatistics<T>> FeatureStats { get; set; } |
Per-feature statistics (min, max, mean, std, missing count). |
IReadOnlyList<T> ClassLabels { get; set; } |
Class labels (for classification). |
IReadOnlyList<string> FeatureNames { get; set; } |
Feature names, if available. |
IReadOnlyList<string> Warnings { get; set; } |
Warnings about the dataset (imbalance, outliers, etc.). |
T TargetMax { get; set; } |
Maximum target value (for regression). |
T TargetMean { get; set; } |
Mean target value (for regression). |
T TargetMedian { get; set; } |
Median target value (for regression). |
T TargetMin { get; set; } |
Minimum target value (for regression). |
T TargetStdDev { get; set; } |
Standard deviation of target (for regression). |
bool AppearsTimeSeries { get; set; } |
Whether the dataset appears to be a time series (ordered, potentially autocorrelated). |
bool IsClassification { get; set; } |
Whether this is a classification task. |
bool IsMultiLabel { get; set; } |
Whether this is a multi-label classification task. |
bool? IsImbalanced { get; set; } |
Whether classes are considered imbalanced (ratio > threshold). |
double MissingProportion { get; } |
Proportion of samples with missing values. |
double OutlierProportion { get; } |
Proportion of outliers. |
double? ClassImbalanceRatio { get; set; } |
Class imbalance ratio (largest class / smallest class). |
double? TargetKurtosis { get; set; } |
Target value kurtosis (for regression). |
double? TargetSkewness { get; set; } |
Target value skewness (for regression). |
int DuplicateCount { get; set; } |
Number of duplicate samples. |
int MissingSamplesCount { get; set; } |
Number of samples with missing values. |
int NumberOfFeatures { get; set; } |
Number of features in the dataset. |
int NumberOfOutputs { get; set; } |
Number of output dimensions (1 for scalar, >1 for multi-output). |
int OutlierCount { get; set; } |
Number of detected outliers. |
int TotalSamples { get; set; } |
Total number of samples in the evaluation set. |
int? NumberOfClasses { get; set; } |
Number of unique classes (for classification). |
Methods
| Method | Summary |
|---|---|
string GetSummary() |
Gets a summary string describing the dataset. |