Commit 7c0959e8 authored by Lukas's avatar Lukas
Browse files

functionality for fixation-saccade data

parent 4375c072
......@@ -50,8 +50,8 @@ config['gaze-reg'] = True # Set to False if you want to run the saccade classifi
config['data-fraction'] = 1.0 # Set to 1.0 if you want to use the whole dataset, experimental feature only for regression task \
#config['data_mode'] = 'fix_only'
config['data_mode'] = 'sacc_only'
#config['data_mode'] = 'sacc_fix'
#config['data_mode'] = 'sacc_only'
config['data_mode'] = 'sacc_fix'
#config['data_mode'] = 'fix_sacc_fix'
# Choose to either run the kerastuner on the model or
......
This diff is collapsed.
This diff is collapsed.
......@@ -46,6 +46,13 @@ def load_regression_data(verbose=True):
if config['data_mode'] == 'sacc_only':
logging.info("Using saccade only dataset")
return get_sacc_data(verbose=verbose)
elif config['data_mode'] == 'sacc_fix':
logging.info("Using saccade-fixation dataset")
return get_fix_sacc_fix_data(verbose=verbose)
elif config['data_mode'] == 'fix_sacc_fix':
logging.info("Using fixation-saccade-fixation dataset")
return get_fix_sacc_fix_data(verbose=verbose)
#ELSE load the dataset with fixations only with the code below
# Load the labels
y = scipy.io.loadmat(config['data_dir'] + config['trainY_variable'])
......@@ -116,6 +123,9 @@ def load_regression_data(verbose=True):
def get_sacc_data(verbose=True):
"""
Returns X, y for the gaze regression task with EEG data X only from saccades
"""
L_saccade = 'L_saccade'
R_saccade = 'R_saccade'
event_names = [L_saccade, R_saccade]
......@@ -190,6 +200,19 @@ def get_sacc_data(verbose=True):
return X_reshaped, y_reshaped
def get_sacc_fix_data():
"""
Returns X, y for the gaze regression task with EEG data X from saccade-fixation combinations
"""
pass
def get_fix_sacc_fix_data():
"""
Returns X, y for the gaze regression task with EEG data X only from triplets of fixation-saccade-fixation
"""
pass
def load_sEEG_events(abs_dir_path):
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment