/// <summary> /// Add a set of evaluation metrics to the set of observations. /// </summary> /// <param name="metrics">The observed binary classification evaluation metric</param> void IMetricsStatistics <MultiClassClassifierMetrics> .Add(MultiClassClassifierMetrics metrics) { MacroAccuracy.Add(metrics.MacroAccuracy); MicroAccuracy.Add(metrics.MicroAccuracy); LogLoss.Add(metrics.LogLoss); LogLossReduction.Add(metrics.LogLossReduction); TopKAccuracy.Add(metrics.TopKAccuracy); if (PerClassLogLoss == null) { PerClassLogLoss = MetricsStatisticsUtils.InitializeArray(metrics.PerClassLogLoss.Count); } MetricsStatisticsUtils.AddToEach(metrics.PerClassLogLoss, PerClassLogLoss); }
/// <summary> /// Add a set of evaluation metrics to the set of observations. /// </summary> /// <param name="metrics">The observed regression evaluation metric</param> void IMetricsStatistics <RankingMetrics> .Add(RankingMetrics metrics) { if (DiscountedCumulativeGains == null) { DiscountedCumulativeGains = MetricsStatisticsUtils.InitializeArray(metrics.DiscountedCumulativeGains.Count); } if (NormalizedDiscountedCumulativeGains == null) { NormalizedDiscountedCumulativeGains = MetricsStatisticsUtils.InitializeArray(metrics.NormalizedDiscountedCumulativeGains.Count); } MetricsStatisticsUtils.AddToEach(metrics.DiscountedCumulativeGains, DiscountedCumulativeGains); MetricsStatisticsUtils.AddToEach(metrics.NormalizedDiscountedCumulativeGains, NormalizedDiscountedCumulativeGains); }