コード例 #1
0
        public void execute()
        {
            var            dtwRec        = new DTWRecognitionSystem(includeTime);
            ISubsetCreator subsetCreator = crossValidate ?
                                           new CrossvalidationSubsetCreator(nTrainingOrSubsets) :
                                           (ISubsetCreator) new SimpleSplitSubsetCreator(nTrainingOrSubsets);

            var tracePreprocessor     = (pointDistance > 0) ? new DynamicAreaPointSampling(pointDistance) : null;
            var recognitionExperiment = new RecognitionExperiment(dtwRec, subsetCreator, tracePreprocessor, dataSourceName);

            var results = recognitionExperiment.execute();

            var    txtTime  = (includeTime) ? "withTime" : "withoutTime";
            string fileName = $"GestureRecognition_DTW{txtTime}_{dataSourceName}_5trains.csv";

            GestureRecognitionResults.saveResultsToFile("..\\..\\ExperimentResults\\" + fileName, results);
        }
コード例 #2
0
        public void execute()
        {
            var results = new LinkedList <GestureRecognitionResults.CrossValidationResult>();

            foreach (var config in configs)
            {
                var            chnmmRec      = new CHnMMRecognitionSystem(config);
                ISubsetCreator subsetCreator = crossValidate ?
                                               new CrossvalidationSubsetCreator(nTrainingOrSubsets) :
                                               (ISubsetCreator) new SimpleSplitSubsetCreator(nTrainingOrSubsets);

                var recognitionExperiment = new RecognitionExperiment(chnmmRec, subsetCreator, null, dataSourceName);

                results.AddLast(new GestureRecognitionResults.CrossValidationResult(config, recognitionExperiment.execute().ToArray(), -1));
            }
            var    txt      = (crossValidate) ? $"{nTrainingOrSubsets}subsets" : $"{nTrainingOrSubsets}trainingtraces";
            string fileName = $"GestureRecognition_CHnMM_{dataSourceName}_{txt}.csv";

            GestureRecognitionResults.saveResultsToFile("..\\..\\ExperimentResults\\" + fileName, results.ToArray());
        }