6e759fb0add81d564062b435afd58177147e42c8,examples/02_decoding/plot_haxby_anova_svm.py,,,#,15

Before Change


// Compute the prediction accuracy for the different folds (i.e. session)
cv_scores = []
for train, test in cv:
    anova_svc.fit(X[train], y[train])
    y_pred = anova_svc.predict(X[test])
    cv_scores.append(np.sum(y_pred == y[test]) / float(np.size(y[test])))

// Return the corresponding mean prediction accuracy

After Change


cv = LeaveOneLabelOut(session // 2)

// Compute the prediction accuracy for the different folds (i.e. session)
cv_scores = cross_val_score(anova_svc, X, y)

// Return the corresponding mean prediction accuracy
classification_accuracy = np.mean(cv_scores)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nilearn/nilearn
Commit Name: 6e759fb0add81d564062b435afd58177147e42c8
Time: 2017-01-20
Author: gael.varoquaux@normalesup.org
File Name: examples/02_decoding/plot_haxby_anova_svm.py
Class Name:
Method Name:


Project Name: glm-tools/pyglmnet
Commit Name: 4dc03426487168eff54c87ec369085efff3621d2
Time: 2017-10-27
Author: mainakjas@gmail.com
File Name: tests/test_pyglmnet.py
Class Name:
Method Name: test_cv


Project Name: tgsmith61591/pmdarima
Commit Name: bc4a5f5d29bb5a74d9cb254ff4dfed916676c8aa
Time: 2019-11-01
Author: tgsmith61591@gmail.com
File Name: examples/model_selection/example_cross_validation.py
Class Name:
Method Name: