/// <summary>
        /// Add a set of evaluation metrics to the set of observations.
        /// </summary>
        /// <param name="metrics">The observed binary classification evaluation metric</param>
        public override void Add(MultiClassClassifierMetrics metrics)
        {
            AccuracyMacro.Add(metrics.MacroAccuracy);
            AccuracyMicro.Add(metrics.MicroAccuracy);
            LogLoss.Add(metrics.LogLoss);
            LogLossReduction.Add(metrics.LogLossReduction);
            TopKAccuracy.Add(metrics.TopKAccuracy);

            if (PerClassLogLoss == null)
            {
                PerClassLogLoss = InitializeArray(metrics.PerClassLogLoss.Length);
            }
            AddArray(metrics.PerClassLogLoss, PerClassLogLoss);
        }
Ejemplo n.º 2
0
        /// <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);
        }