예제 #1
0
 public void PreConfig()
 {
     Classifier = new DecisionTreeClassifier(FusionFramework.Classifiers.DecisionTreeLearningAlgorithms.C45Learning);
     Classifier.Load("Modules/HAR/WisdnDT");
     Feature1 = new DataInFeatureOut(AccelerometerSensor.GetConfiguration().Reader, AccelerometerSensor.GetConfiguration().Features);
     Decision = new FeaturesInDecisionOut(new List <IFusionStrategy>()
     {
         Feature1
     }, Classifier);
 }
예제 #2
0
 public void PreConfig()
 {
     Classifier = new MulticlassSupportVectorMachineClassifier();
     Classifier.Load("Modules/HGR/MyoGym_SVM");
     AllFeatures = new DataInFeatureOut(MyoVirtualSensor.GetConfiguration().Reader, MyoVirtualSensor.GetConfiguration().Features);
     Decision    = new FeaturesInDecisionOut(new List <IFusionStrategy>()
     {
         AllFeatures
     }, Classifier);
 }
예제 #3
0
 public void PreConfig()
 {
     Classifier = new MulticlassSupportVectorMachineClassifier();
     Classifier.Load("XORModule1");
     Feature1         = new DataInFeatureOut(BinaryOne.GetConfiguration().Reader, BinaryOne.GetConfiguration().Features);
     Feature2         = new DataInFeatureOut(BinaryTwo.GetConfiguration().Reader, BinaryTwo.GetConfiguration().Features);
     FilteredFeatures = new FeaturesInFeatureOut(new List <IFusionStrategy>()
     {
         Feature1, Feature2
     });
     Decision = new FeaturesInDecisionOut(new List <IFusionStrategy>()
     {
         FilteredFeatures
     }, Classifier);
 }
예제 #4
0
        public void PreConfig()
        {
            Classifier = new DecisionTreeClassifier(FusionFramework.Classifiers.DecisionTreeLearningAlgorithms.C45Learning);
            Classifier.Load("LDAMyoGYM");
            AccelerometerFeatures = new DataInFeatureOut(AccelerometerSensor.GetConfiguration().Reader, AccelerometerSensor.GetConfiguration().Features);
            GryoFeatures          = new DataInFeatureOut(GyroscopeSensor.GetConfiguration().Reader, GyroscopeSensor.GetConfiguration().Features);
            EMGFeatures           = new DataInFeatureOut(EmgSensor.GetConfiguration().Reader, EmgSensor.GetConfiguration().Features);
            var CombinedFeatures = new FeaturesInFeatureOut(new List <IFusionStrategy>()
            {
                AccelerometerFeatures, GryoFeatures, EMGFeatures
            });

            Decision = new FeaturesInDecisionOut(new List <IFusionStrategy>()
            {
                CombinedFeatures
            }, Classifier);
        }
예제 #5
0
        static void MyoGymFusion()
        {
            var Classifier = new MulticlassSupportVectorMachineClassifier();

            Classifier.Load("C:\\Users\\riz\\Desktop\\MyoGYm\\MyoGym_SVM1");
            var Features = new DataInFeatureOut(new MQTTReader <double[]>("/i5/myo/full", new SlidingWindow <double[]>(200, 0)), new IFeature[] {
                new HjorthParameters(8, 9, 10),
                new StandardDeviation(8, 9, 10),
                new Mean(8, 9, 10),
                new Max(8, 9, 10),
                new Min(8, 9, 10),
                new Percentile(5, 8, 9, 10),
                new Percentile(10, 8, 9, 10),
                new Percentile(25, 8, 9, 10),
                new Percentile(50, 8, 9, 10),
                new Percentile(75, 8, 9, 10),
                new Percentile(90, 8, 9, 10),
                new Percentile(95, 8, 9, 10),
                new ZeroCrossing(8, 9, 10),
                new MeanCrossing(8, 9, 10),
                new Entropy(8, 9, 10),
                new Correlation(9, 10),
                new Correlation(9, 11),
                new Correlation(10, 11),

                new HjorthParameters(11, 12, 13),
                new StandardDeviation(11, 12, 13),
                new Mean(11, 12, 13),
                new Max(11, 12, 13),
                new Min(11, 12, 13),
                new Percentile(5, 11, 12, 13),
                new Percentile(10, 11, 12, 13),
                new Percentile(25, 11, 12, 13),
                new Percentile(50, 11, 12, 13),
                new Percentile(75, 11, 12, 13),
                new Percentile(90, 11, 12, 13),
                new Percentile(95, 11, 12, 13),
                new ZeroCrossing(11, 12, 13),
                new MeanCrossing(11, 12, 13),
                new Entropy(11, 12, 13),

                new StandardDeviation(0, 1, 2, 3, 4, 5, 6, 7),
                new Mean(0, 1, 2, 3, 4, 5, 6, 7),
                new Max(0, 1, 2, 3, 4, 5, 6, 7),
                new Min(0, 1, 2, 3, 4, 5, 6, 7),
                new Percentile(5, 0, 1, 2, 3, 4, 5, 6, 7),
                new Percentile(10, 0, 1, 2, 3, 4, 5, 6, 7),
                new Percentile(25, 0, 1, 2, 3, 4, 5, 6, 7),
                new Percentile(50, 0, 1, 2, 3, 4, 5, 6, 7),
                new Percentile(75, 0, 1, 2, 3, 4, 5, 6, 7),
                new Percentile(90, 0, 1, 2, 3, 4, 5, 6, 7),
                new Percentile(95, 0, 1, 2, 3, 4, 5, 6, 7),

                new SumLargerThan(25, 0, 1, 2, 3, 4, 5, 6, 7),
                new SumLargerThan(50, 0, 1, 2, 3, 4, 5, 6, 7),
                new SumLargerThan(100, 0, 1, 2, 3, 4, 5, 6, 7)
            });
            var Decision = new FeaturesInDecisionOut(new List <IFusionStrategy>()
            {
                Features
            }, Classifier);

            Decision.OnFusionFinished = (decision) =>
            {
                Console.WriteLine(decision);
            };

            Features.Start();
        }