Example #1
0
        private static void RunEMGCSV(string filename)
        {
            EMGCSV analysis = new EMGCSV(filename);

            analysis.CreateCSV();
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
Example #2
0
        private static void RunEMGCrossValidation(string directoryPath)
        {
            List <string> filepaths = getFiles(directoryPath, "*.emg");
            List <List <TrainingValue> > dataSets = new List <List <TrainingValue> >();

            foreach (string filepath in filepaths)
            {
                List <EMGPacket>     packets = EMGCSV.ReadPackets(filepath);
                List <TrainingValue> data    = EMGCSV.GetTrainingValues(packets, false);
                dataSets.Add(data);
            }

            List <int> ks = new List <int> {
                5,
                10,
                15
            };

            CrossValidation.CrossValidate(dataSets, ks, EMGProcessor.FEATURE_COUNT, filepaths);

            Console.ReadKey();
        }