Skip to content
Browse files

Name/focus changed, not yet functional

  • Loading branch information...
1 parent bc16113 commit 77974b5dda1f60a023fb07b1f579f45ee9622063 @ajknoll committed Jul 6, 2011
Showing with 26 additions and 9 deletions.
  1. +0 −9 classify/naive_bayes.py
  2. +26 −0 classify/signal_processing.py
View
9 classify/naive_bayes.py
@@ -1,9 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf_8 -*-
-
-"""
-Attempts to learn the classification states (baseline, 1, 2, 3) for our task
-using a naive Bayes classifier.
-"""
-
-from data.convertMat import ExperimentData, TaskRecording
View
26 classify/signal_processing.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf_8 -*-
+
+"""
+Process signals to extract features for classification/learning.
+"""
+
+from data.convertMat import ExperimentData, TaskRecording
+import numpy
+
+class SignalLearn:
+
+ def getRmsList(self, data):
+ assert(data.__class__ == ExperimentData)
+ for subject in data.matrix:
+ for task in subject:
+ if task.nEpochs == 1:
+ rmsList = [rootMeanSquare(channel) for channel in task.data]
+ sample.append(rmsList)
+ classes.append(task.condition)
+ else:
+ for epoch in seq(task.nEpochs):
+ rmsList = [rootMeanSquare(channel) for channel in task.data[:, :, epoch]]
+ sample.append(rmsList)
+ classes.append(task.condition)
+

0 comments on commit 77974b5

Please sign in to comment.
Something went wrong with that request. Please try again.