Ejemplo n.º 1
0
def SVM_quad_ordpos(subject):

    score, distance, times = SVM_funcs.SVM_decode_feature(
        subject,
        'WithinChunkPosition',
        load_residuals_regression=True,
        list_sequences=[4],
        crop=[-0.1, 0.4],
        cross_val_func=None,
        filter_from_metadata="StimPosition > 2 and StimPosition < 15")
    save_name = config.SVM_path + subject + '/feature_decoding/' + 'resid_' + 'WithinChunkPosition' + '_quads_score_dict.npy'
    np.save(save_name, {'score': score, 'times': times, 'distance': distance})
    score, distance, times = SVM_funcs.SVM_decode_feature(
        subject,
        'WithinChunkPosition',
        load_residuals_regression=False,
        list_sequences=[4],
        crop=[-0.1, 0.4],
        cross_val_func=None,
        filter_from_metadata="StimPosition > 2 and StimPosition < 15")
    save_name = config.SVM_path + subject + '/feature_decoding/' + 'full_data_' + 'WithinChunkPosition' + '_quads_score_dict.npy'
    np.save(save_name, {'score': score, 'times': times, 'distance': distance})
Ejemplo n.º 2
0
def SVM_features_chunkBeg(subject, load_residuals_regression=True):
    if load_residuals_regression:
        resid_suffix = 'resid_cv_'
    else:
        resid_suffix = 'full_data_'
    score, distance, times = SVM_funcs.SVM_decode_feature(
        subject,
        'ChunkBeginning',
        load_residuals_regression=load_residuals_regression,
        list_sequences=[3, 4, 5, 6, 7],
        crop=[-0.1, 0.4],
        cross_val_func=None)
    save_name = config.SVM_path + subject + '/feature_decoding/' + resid_suffix + 'ChunkBeg' + '_score_dict.npy'
    np.save(save_name, {'score': score, 'times': times, 'distance': distance})
Ejemplo n.º 3
0
def SVM_features_stimID_eeg(subject, load_residuals_regression=True):
    if load_residuals_regression:
        resid_suffix = 'resid_cv_'
    else:
        resid_suffix = 'full_data_'
    score, distance, times = SVM_funcs.SVM_decode_feature(
        subject,
        'StimID',
        load_residuals_regression=load_residuals_regression,
        crop=[-0.1, 0.4],
        cross_val_func=None,
        meg=False)
    save_name = config.SVM_path + subject + '/feature_decoding/' + resid_suffix + 'StimID' + '_EEGONLY_score_dict.npy'
    np.save(save_name, {'score': score, 'times': times, 'distance': distance})
Ejemplo n.º 4
0
def SVM_features_withinchunk_train_quads_test_others(
        subject, load_residuals_regression=True):
    if load_residuals_regression:
        resid_suffix = 'resid_cv_'
    else:
        resid_suffix = 'full_data_'
    score, distance, times = SVM_funcs.SVM_decode_feature(
        subject,
        'WithinChunkPosition',
        load_residuals_regression=load_residuals_regression,
        crop=[-0.1, 0.4],
        cross_val_func=SVM_funcs.train_quads_test_others,
        balance_features=False,
        filter_from_metadata="StimPosition > 2 and StimPosition < 15")
    save_name = config.SVM_path + subject + '/feature_decoding/' + resid_suffix + 'WithinChunkPosition_train_Quads_test_others' + '_score_dict.npy'
    np.save(save_name, {'score': score, 'times': times, 'distance': distance})
Ejemplo n.º 5
0
def SVM_features_number_ofOpenedChunks(subject,
                                       load_residuals_regression=True):
    if load_residuals_regression:
        resid_suffix = 'resid_cv_'
    else:
        resid_suffix = 'full_data_'
    score, distance, times = SVM_funcs.SVM_decode_feature(
        subject,
        'OpenedChunks',
        SVM_dec=SVM_funcs.regression_decoder(),
        load_residuals_regression=load_residuals_regression,
        list_sequences=[3, 4, 5, 6, 7],
        crop=[-0.1, 0.4],
        cross_val_func=None,
        balance_features=False,
        distance=False)
    save_name = config.SVM_path + subject + '/feature_decoding/' + resid_suffix + 'Number_Open_Chunks' + '_score_dict.npy'
    np.save(save_name, {'score': score, 'times': times, 'distance': distance})