Ejemplo n.º 1
0
        private void ComputeSuperFeatures()
        {
            foreach (IFeature f in SubFeatures)
            {
                FastQueue <double> CurrentQueue = SubResults[f];
                List <double>      CurrentData  = CurrentQueue.Peek(SuperWindowLength);
                CurrentQueue.Delete(SuperWindowShift);
                DataProvider.Data = CurrentData;

                List <IFeature> CurrentSuperFeatures = SuperFeatures[f];
                foreach (IFeature superf in CurrentSuperFeatures)
                {
                    superf.Compute();
                    FinalFeatures.Add(superf.Feature);
                }
            }

            if (SuperFeaturesComputed != null)
            {
                SubFeaturesComputedEventArgs e = new SubFeaturesComputedEventArgs();
                e.ComputedFeatures = FinalFeatures;
                SuperFeaturesComputed.Invoke(this, e);
            }
            Classify();
            AllFeatures.Add(new List <double>(FinalFeatures));
            FinalFeatures.Clear();
            if (SubResults.First().Value.Count > SuperWindowLength)
            {
                ComputeSuperFeatures();
            }
        }
Ejemplo n.º 2
0
        private void ComputeSuperFeatures()
        {
            foreach (IFeature f in SubFeatures)
            {
                FastQueue<double> CurrentQueue = SubResults[f];
                List<double> CurrentData = CurrentQueue.Peek(SuperWindowLength);
                CurrentQueue.Delete(SuperWindowShift);
                DataProvider.Data = CurrentData;

                List<IFeature> CurrentSuperFeatures = SuperFeatures[f];
                foreach (IFeature superf in CurrentSuperFeatures)
                {
                    superf.Compute();
                    FinalFeatures.Add(superf.Feature);
                }

            }

            if (SuperFeaturesComputed != null)
            {
                SubFeaturesComputedEventArgs e = new SubFeaturesComputedEventArgs();
                e.ComputedFeatures = FinalFeatures;
                SuperFeaturesComputed.Invoke(this, e);
            }
            Classify();
            AllFeatures.Add(new List<double>(FinalFeatures));
            FinalFeatures.Clear();
            if (SubResults.First().Value.Count > SuperWindowLength)
                ComputeSuperFeatures();
        }