af8750996f586c76d8b876e123cb7ca397a81e26,examples/02_decoding/plot_haxby_full_analysis.py,,,#,22

Before Change



// Make a data splitting object for cross validation
from sklearn.cross_validation import LeaveOneLabelOut, cross_val_score
cv = LeaveOneLabelOut(session_labels)

mask_names = ["mask_vt", "mask_face", "mask_house"]

mask_scores = {}

After Change



// Make a data splitting object for cross validation
from sklearn.model_selection import LeaveOneGroupOut, cross_val_score
cv = LeaveOneGroupOut()

mask_names = ["mask_vt", "mask_face", "mask_house"]

mask_scores = {}
mask_chance_scores = {}

for mask_name in mask_names:
    print("Working on mask %s" % mask_name)
    // For decoding, standardizing is often very important
    mask_filename = haxby_dataset[mask_name][0]
    masker = NiftiMasker(mask_img=mask_filename, standardize=True)
    masked_timecourses = masker.fit_transform(
        func_filename)[task_mask]

    mask_scores[mask_name] = {}
    mask_chance_scores[mask_name] = {}

    for category in categories:
        print("Processing %s %s" % (mask_name, category))
        classification_target = (stimuli[task_mask] == category)
        mask_scores[mask_name][category] = cross_val_score(classifier,
                                                           masked_timecourses,
                                                           classification_target,
                                                           cv=cv.split(X=masked_timecourses, groups=session_labels),
                                                           scoring="roc_auc",
                                                           )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: nilearn/nilearn
Commit Name: af8750996f586c76d8b876e123cb7ca397a81e26
Time: 2018-07-18
Author: kc.insight.pi@gmail.com
File Name: examples/02_decoding/plot_haxby_full_analysis.py
Class Name:
Method Name:


Project Name: nilearn/nilearn
Commit Name: af8750996f586c76d8b876e123cb7ca397a81e26
Time: 2018-07-18
Author: kc.insight.pi@gmail.com
File Name: examples/02_decoding/plot_haxby_different_estimators.py
Class Name:
Method Name:


Project Name: nilearn/nilearn
Commit Name: ffff23e8793139fa3c2653c07b342b8009a2933e
Time: 2018-07-17
Author: kc.insight.pi@gmail.com
File Name: examples/plot_decoding_tutorial.py
Class Name:
Method Name:


Project Name: nilearn/nilearn
Commit Name: aa7c4dda8fe530c3843d7b6d670b1c6c96cf4c16
Time: 2018-07-18
Author: kc.insight.pi@gmail.com
File Name: examples/02_decoding/plot_haxby_anova_svm.py
Class Name:
Method Name: