public AffectiveInformation Fuse(IEnumerable <AugmentedAffectiveInformation> affectiveInformation)
        {
            float score       = 0.0f;
            float totalWeight = 0.0f;

            if (affectiveInformation.Count() == 0)
            {
                return(null);
            }

            var result = new AffectiveInformation();

            result.Name = affectiveInformation.FirstOrDefault().Name;

            if (!this.KalmanFilters.ContainsKey(result.Name))
            {
                return(null);
            }
            var kalmanFilter = this.KalmanFilters[result.Name];

            kalmanFilter.ProcessObservations(affectiveInformation);
            result.Score = (float)System.Math.Round(kalmanFilter.X, 3);

            return(result);
        }
Ejemplo n.º 2
0
        public AffectiveInformation Fuse(IEnumerable<AugmentedAffectiveInformation> affectiveInformation)
        {
            if (affectiveInformation.Count() == 0)
            {
                return null;
            }

            AffectiveInformation result = new AffectiveInformation();
            result.Name = affectiveInformation.FirstOrDefault().Name;
            result.Score = affectiveInformation.Select(aff => aff.Score).Max();

            return result;
        }
Ejemplo n.º 3
0
        public AffectiveInformation Fuse(IEnumerable <AugmentedAffectiveInformation> affectiveInformation)
        {
            if (affectiveInformation.Count() == 0)
            {
                return(null);
            }

            AffectiveInformation result = new AffectiveInformation();

            result.Name  = affectiveInformation.FirstOrDefault().Name;
            result.Score = affectiveInformation.Select(aff => aff.Score).Max();

            return(result);
        }
        public AffectiveInformation Fuse(IEnumerable<AugmentedAffectiveInformation> affectiveInformation)
        {
            float score = 0.0f;
            float totalWeight = 0.0f;

            if (affectiveInformation.Count() == 0)
            {
                return null;
            }

            AffectiveInformation result = new AffectiveInformation();
            result.Name = affectiveInformation.FirstOrDefault().Name;

            foreach(var ai in affectiveInformation)
            {
                score += ai.Classifier.Weight * ai.Score;
                totalWeight += ai.Classifier.Weight;
            }

            result.Score = score / totalWeight;

            return result;
        }
        public AffectiveInformation Fuse(IEnumerable<AugmentedAffectiveInformation> affectiveInformation)
        {
            float score = 0.0f;
            float totalWeight = 0.0f;

            if (affectiveInformation.Count() == 0)
            {
                return null;
            }

            var result = new AffectiveInformation();
            result.Name = affectiveInformation.FirstOrDefault().Name;

            if(!this.KalmanFilters.ContainsKey(result.Name))
            {
                return null;
            }
            var kalmanFilter = this.KalmanFilters[result.Name];

            kalmanFilter.ProcessObservations(affectiveInformation);
            result.Score = (float) System.Math.Round(kalmanFilter.X,3);

            return result;
        }
Ejemplo n.º 6
0
        public AffectiveInformation Fuse(IEnumerable <AugmentedAffectiveInformation> affectiveInformation)
        {
            float score       = 0.0f;
            float totalWeight = 0.0f;

            if (affectiveInformation.Count() == 0)
            {
                return(null);
            }

            AffectiveInformation result = new AffectiveInformation();

            result.Name = affectiveInformation.FirstOrDefault().Name;

            foreach (var ai in affectiveInformation)
            {
                score       += ai.Classifier.Weight * ai.Score;
                totalWeight += ai.Classifier.Weight;
            }

            result.Score = score / totalWeight;

            return(result);
        }
 public AugmentedAffectiveInformation(AffectiveInformation affectiveInfo, Classifier classifier)
 {
     this.Name = affectiveInfo.Name;
     this.Score = affectiveInfo.Score;
     this.Classifier = classifier;
 }
 public AugmentedAffectiveInformation(AffectiveInformation affectiveInfo, Classifier classifier)
 {
     this.Name       = affectiveInfo.Name;
     this.Score      = affectiveInfo.Score;
     this.Classifier = classifier;
 }