8000 removed cross_val_Score · mne-tools/mne-python@e19ed6a · GitHub
[go: up one dir, main page]

Skip to content

Commit e19ed6a

Browse files
committed
removed cross_val_Score
1 parent 179da28 commit e19ed6a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

doc/whats_new.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ API
203203

204204
- :func:`mne.preprocessing.create_ecg_epochs` now includes all the channels when ``picks=None`` by `Jaakko Leppakangas`_
205205

206+
- Added functionality to change scoring method in :class:`mne.decoding.SearchLight` by `Asish Panda`_
207+
206208
.. _changes_0_12:
207209

208210
Version 0.12

mne/decoding/search_light.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
import numpy as np
66

7+
from sklearn.metrics import make_scorer
8+
79
from .mixin import TransformerMixin
810
from .base import BaseEstimator, _check_estimator
911
from ..parallel import parallel_func
1012

11-
from sklearn.metrics import make_scorer
12-
1313

1414
class SearchLight(BaseEstimator, TransformerMixin):
1515
"""Search Light.

mne/decoding/tests/test_search_light.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
from ..search_light import SearchLight, GeneralizationLight
1111
from .. import Vectorizer
1212

13-
from sklearn.metrics import accuracy_score, roc_auc_score
14-
from sklearn.cross_validation import cross_val_score
13+
from sklearn.metrics import roc_auc_score
1514

1615
def make_data():
1716
n_epochs, n_chan, n_time = 50, 32, 10
@@ -63,8 +62,6 @@ def test_searchlight():
6362
score = sl.score(X, y)
6463
assert_array_equal(score.shape, [n_time])
6564
assert_true(score.dtype == float)
66-
sl = SearchLight(LogisticRegression())
67-
assert_array_equal(cross_val_score(sl, X, y, scoring='roc_auc'), score)
6865

6966
# n_jobs
7067
sl = SearchLight(LogisticRegression(), n_jobs=2)

0 commit comments

Comments
 (0)
0