Exemplo n.º 1
0
        public static double ProcessScorePositive(EmotionScore emo)
        {
            //weights
            double Weight_happiness = 1;
            double Weight_surprise  = 1;
            double Weight_neutral   = 0;
            double Weight_sadness   = -1;
            double Weight_anger     = -1;
            double Weight_disgust   = -1;
            double Weight_fear      = -1;
            double Weight_contempt  = -1;

            double AggEmoScore = 0.0;

            //weighted scores
            double happiness = emo.scores.happiness * Weight_happiness;
            double surprise  = emo.scores.surprise * Weight_surprise;
            double neutral   = emo.scores.neutral * Weight_neutral;
            double sadness   = emo.scores.sadness * Weight_sadness;
            double anger     = emo.scores.anger * Weight_anger;
            double disgust   = emo.scores.disgust * Weight_disgust;
            double contempt  = emo.scores.contempt * Weight_contempt;
            double fear      = emo.scores.fear * Weight_fear;

            double positiveEmo_max = Math.Max(happiness, surprise);
            double negativeEmo_min = Math.Min(sadness, Math.Min(anger, Math.Min(disgust, Math.Min(fear, contempt))));

            AggEmoScore = Math.Abs(positiveEmo_max) >= Math.Abs(negativeEmo_min) ? positiveEmo_max : negativeEmo_min;
            return(AggEmoScore);
        }
Exemplo n.º 2
0
 public static double ProcessScoreNegative(EmotionScore emo)
 {
     return(-0.5 * ModelUtility.ProcessScorePositive(emo));
 }