Пример #1
0
 public BenchmarkStatistics(int numOfFeatureClasses)
 {
     MacroAccuracy        = new StatValue();
     MicroAccuracy        = new StatValue();
     LogLoss              = new StatValue();
     LogLossReduction     = new StatValue();
     TimeTakenMiliSeconds = new StatValue();
     StatConfusionMatrix  = new StatConfusionMatrix(numOfFeatureClasses);
 }
        /// <summary>
        /// Creates a stat confusion matrix. Requires <see cref="MachineLearning.IDtoEmotion"/> to be set up.
        /// </summary>
        /// <param name="numOfClasses"></param>
        public StatConfusionMatrix(int numOfClasses)
        {
            // Get names of emotions.
            IdToEmotionName = MachineLearning.IDtoEmotion;

            // Setup the rest of the values.
            PerClassPrescision = new Dictionary <int, StatValue>(numOfClasses);
            PerClassRecall     = new Dictionary <int, StatValue>(numOfClasses);
            RecallMatrix       = new StatValue[numOfClasses, numOfClasses];

            for (int i = 0; i < numOfClasses; ++i)
            {
                PerClassRecall[i]     = new StatValue();
                PerClassPrescision[i] = new StatValue();

                for (int j = 0; j < numOfClasses; ++j)
                {
                    RecallMatrix[i, j] = new StatValue();
                }
            }
        }