SAMPLING_FREQ = 125.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 5 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [1, 2] T_MIN, T_MAX = 2.5, 4.5 # time before event, time after event CSP_N = 12 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setPathToCal(DATA_CAL_PATH, CAL_EVENTS_PATH) ap.setPathToVal(DATA_VAL_PATH, VAL_EVENTS_PATH) ap.setValidChannels([-1]) ap.set_balance_epochs(False) autoscore = ap.trainModel() valscore = ap.validateModel() print autoscore
SAMPLING_FREQ = 125.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 5 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [1,2] T_MIN, T_MAX = 2.5,4.5 # time before event, time after event CSP_N = 12 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setPathToCal(DATA_CAL_PATH, CAL_EVENTS_PATH) ap.setPathToVal(DATA_VAL_PATH, VAL_EVENTS_PATH) ap.setValidChannels([-1]) ap.set_balance_epochs(False) autoscore = ap.trainModel() valscore = ap.validateModel() print autoscore print valscore
SAMPLING_FREQ = 125.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 5 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [1, 2] T_MIN, T_MAX = 3, 5 # time before event, time after event CSP_N = 12 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setPathToCal(DATA_CAL_PATH, CAL_EVENTS_PATH) ap.setValidChannels([-1]) ap.define_bad_epochs(100) autoscore = ap.trainModel() crossvalscore = ap.cross_validate_model(10, 0.2) print autoscore print crossvalscore
SAMPLING_FREQ = 125.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 5 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [1, 2] T_MIN, T_MAX = 3, 8 # time before event, time after event CSP_N = 8 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setPathToCal(DATA_CAL_PATH, CAL_EVENTS_PATH) ap.setValidChannels([-1]) ap.define_bad_epochs(100) autoscore = ap.trainModel() crossvalscore = ap.cross_validate_model(10, 0.2) print 'SelfValidation result: ', autoscore print 'Cross Validation result: ', crossvalscore
SAMPLING_FREQ = 250.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 7 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [769, 770, 771, 772] T_MIN, T_MAX = 0.5, 2.5 # time before event, time after event CSP_N = 8 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setValidChannels(range(22)) data, ev = ap.loadData(DATA_PATH, EVENTS_PATH) epochs, labels = ap.loadEpochs(data, ev) epochs = ap.preProcess(epochs) idx_left = np.where(labels == EVENT_IDS[0])[0] idx_right = np.where(labels == EVENT_IDS[1])[0] idx_foot = np.where(labels == EVENT_IDS[2])[0] idx_tongue = np.where(labels == EVENT_IDS[3])[0]
SAMPLING_FREQ = 125.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 5 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [1,2] T_MIN, T_MAX = 3,8 # time before event, time after event CSP_N = 8 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setPathToCal(DATA_CAL_PATH, CAL_EVENTS_PATH) ap.setValidChannels([-1]) ap.define_bad_epochs(100) autoscore = ap.trainModel() crossvalscore = ap.cross_validate_model(10, 0.2) print 'SelfValidation result: ', autoscore print 'Cross Validation result: ', crossvalscore
SAMPLING_FREQ = 125.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 15. FILT_ORDER = 5 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [1, 2] T_MIN, T_MAX = -4, 4 # time before event, time after event CSP_N = 12 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setPathToCal(DATA_CAL_PATH, CAL_EVENTS_PATH) ap.setPathToVal(DATA_VAL_PATH, VAL_EVENTS_PATH) ap.setValidChannels([-1]) data, events = ap.loadData(DATA_CAL_PATH, CAL_EVENTS_PATH) data = ap.preProcess(data) epochs, labels = ap.loadEpochs(data, events)
SAMPLING_FREQ = 250.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 7 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [769, 770, 771, 772] T_MIN, T_MAX = 0.5, 2.5 # time before event, time after event CSP_N = 8 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setValidChannels(range(22)) data, ev = ap.loadData(DATA_PATH, EVENTS_PATH) epochs, labels = ap.loadEpochs(data, ev) epochs = ap.preProcess(epochs) idx_left = np.where(labels == EVENT_IDS[0])[0] idx_right = np.where(labels == EVENT_IDS[1])[0] idx_foot = np.where(labels == EVENT_IDS[2])[0]
SAMPLING_FREQ = 250.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 5 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [1,2] T_MIN, T_MAX = 2.5,4.5 # time before event, time after event CSP_N = 12 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setPathToCal(DATA_CAL_PATH, CAL_EVENTS_PATH) ap.setValidChannels(range(23)) data, events = ap.loadData(DATA_CAL_PATH, CAL_EVENTS_PATH) data = ap.preProcess(data) c3_idx = 7 front=1 left = 6 right = 8
SAMPLING_FREQ = 125.0 # FILTER SPEC LOWER_CUTOFF = 8. UPPER_CUTOFF = 30. FILT_ORDER = 5 # EPOCH EXTRACTION CONFIG: EVENT_IDS = [1,2] T_MIN, T_MAX = 3,5 # time before event, time after event CSP_N = 12 ap = Approach() ap.defineApproach(SAMPLING_FREQ, LOWER_CUTOFF, UPPER_CUTOFF, FILT_ORDER, CSP_N, EVENT_IDS, T_MIN, T_MAX) ap.setPathToCal(DATA_CAL_PATH, CAL_EVENTS_PATH) ap.setValidChannels([-1]) ap.define_bad_epochs(100) autoscore = ap.trainModel() crossvalscore = ap.cross_validate_model(10, 0.2) print autoscore print crossvalscore