Exemple #1
0
        private static void RunEEGCrossValidation(string directoryPath)
        {
            List <string> filepaths = getFiles(directoryPath, "*.eeg");
            List <List <TrainingValue> > dataSets = new List <List <TrainingValue> >();

            foreach (string filepath in filepaths)
            {
                List <TrainingValue> data = EEGAnalysis.getTrainingValues(filepath);
                dataSets.Add(data);
            }

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

            CrossValidation.CrossValidate(dataSets, ks, EEGProcessor.FEATURE_COUNT, filepaths);
        }
Exemple #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();
        }