Skip to content

Conversation

@iamsc
Copy link
Contributor

@iamsc iamsc commented Nov 20, 2019

Reference issue

Fixes #7027 .

What does this implement/fix?

This PR adds the support of GridSearchCV for LinearModel. I also ran the decoding/tests/test_base.py and got the 3 passed.

@agramfort
Copy link
Member

@codecov
Copy link

codecov bot commented Nov 20, 2019

Codecov Report

Merging #7089 into master will decrease coverage by 0.09%.
The diff coverage is 98.41%.

@@            Coverage Diff            @@
##           master    #7089     +/-   ##
=========================================
- Coverage   89.74%   89.65%   -0.1%     
=========================================
  Files         442      442             
  Lines       77786    78106    +320     
  Branches    12621    12662     +41     
=========================================
+ Hits        69812    70024    +212     
- Misses       5163     5241     +78     
- Partials     2811     2841     +30

…ification/Regression/GridSearchCV estimators' tests for get_coef function.
@iamsc
Copy link
Contributor Author

iamsc commented Nov 20, 2019

@iamsc can you please add a new test in https://github.com/mne-tools/mne-python/blob/master/mne/decoding/tests/test_base.py ? thx

No problem~ I have modified some tests in test_base.py.

Because the original test_get_coef function in test_base.py only focused on the regression estimator tests, I added some new tests which considers some possible types of estimators, likes classification, regression, classification with GridSearchCV, regression with GridSearchCV.

Moreover, in test_linearmodel function, I also added the classification/regression with GridSearchCV tests.

Here is the result of test_base.py:

Test session starts (platform: darwin, Python 3.7.4, pytest 5.1.2, pytest-sugar 0.9.2)
cachedir: .pytest_cache
rootdir: /Users/scott/Documents/Codes/mne-python/, inifile: setup.cfg
plugins: arraydiff-0.3, sugar-0.9.2, remotedata-0.3.2, doctestplus-0.4.0, timeout-1.3.3, openfiles-0.4.0, cov-2.7.1, mock-1.10.4
collecting ...
 mne/decoding/tests/test_base.py::test_get_coef ✓                                                                                                                 33% ███▍
 mne/decoding/tests/test_base.py::test_linearmodel ✓                                                                                                              67% ██████▋
 mne/decoding/tests/test_base.py::test_cross_val_multiscore ✓                                                                                                    100% ██████████
---------------------------------------- generated xml file: /Users/scott/Documents/Codes/mne-python/junit-results.xml -----------------------------------------
========================================================================== slowest 20 test durations ===========================================================================
257.90s call     mne/decoding/tests/test_base.py::test_get_coef
3.31s setup    mne/decoding/tests/test_base.py::test_get_coef
0.42s call     mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.14s call     mne/decoding/tests/test_base.py::test_linearmodel
0.00s teardown mne/decoding/tests/test_base.py::test_linearmodel
0.00s teardown mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s setup    mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_get_coef

Results (261.97s):
       3 passed

@agramfort
Copy link
Member

@iamsc you have some flake8 errors. Run make pep or flake8 on your files to see what's wrong

@iamsc
Copy link
Contributor Author

iamsc commented Nov 21, 2019

@iamsc you have some flake8 errors. Run make pep or flake8 on your files to see what's wrong

Sorry for those errors. I have already fixed those errors on my files and checked them again using make pep.

However, there are still some other errors from make pep, likes mne/tests/test_docstring_parameters.py. I just ignored this kind of errors because I have not modified those files in this PR.

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests should be as fast as possible. Can you report how long it takes to run now compared to before?

lm_gs_classification = LinearModel(
GridSearchCV(
svm.SVC(), parameters,
cv=5, refit=True, iid=False, n_jobs=5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for testing try to use something as fast as possible. So cv=2. Also n_jobs should be set to 1 for testing.

lm_gs_regression = LinearModel(
GridSearchCV(
svm.SVR(), parameters, cv=5,
refit=True, iid=False, n_jobs=5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

clf = LinearModel(
GridSearchCV(
svm.SVC(), parameters, cv=5,
refit=True, iid=False, n_jobs=5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

clf = LinearModel(
GridSearchCV(
svm.SVR(), parameters, cv=5,
refit=True, iid=False, n_jobs=5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@iamsc
Copy link
Contributor Author

iamsc commented Nov 21, 2019

tests should be as fast as possible. Can you report how long it takes to run now compared to before?

If it only sets cv as 2, the test duration will decrease 77.17 seconds compared to before.

========================================================================== slowest 20 test durations ===========================================================================
180.56s call     mne/decoding/tests/test_base.py::test_get_coef
3.36s setup    mne/decoding/tests/test_base.py::test_get_coef
0.50s call     mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.08s call     mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_get_coef
0.00s teardown mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_linearmodel

Results (184.80s):
       3 passed

If I remove 1000 from C list in parameter grids and set cv as 2, the test duration will decrease to 15.92 seconds.

========================================================================== slowest 20 test durations ===========================================================================
11.61s call     mne/decoding/tests/test_base.py::test_get_coef
3.60s setup    mne/decoding/tests/test_base.py::test_get_coef
0.19s call     mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.03s call     mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_get_coef
0.00s teardown mne/decoding/tests/test_base.py::test_linearmodel

Results (15.69s):
       3 passed

I will re-commit the second one later.

@larsoner
Copy link
Member

Even 11 sec is quite long for a test. How long is it in master? Ideally these changes wouldn't add more than 0.1 sec or so. We run a lot of tests, and a lot that do much more complex processing than this, so we need to keep test times to a minimum.

If you need help speeding it up let me know and I can look at tweaking the test to get the time down

@iamsc
Copy link
Contributor Author

iamsc commented Nov 21, 2019

Even 11 sec is quite long for a test. How long is it in master? Ideally these changes wouldn't add more than 0.1 sec or so. We run a lot of tests, and a lot that do much more complex processing than this, so we need to keep test times to a minimum.

If you need help speeding it up let me know and I can look at tweaking the test to get the time down

Here is the time duration results of master:

========================================================================== slowest 20 test durations ===========================================================================
3.59s setup    mne/decoding/tests/test_base.py::test_get_coef
0.70s call     mne/decoding/tests/test_base.py::test_get_coef
0.23s call     mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.01s call     mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_linearmodel
0.00s teardown mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_get_coef
0.00s setup    mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_linearmodel

Results (4.82s):
       3 passed

I also tried to remove 100 from C list further, the results are as follows:

========================================================================== slowest 20 test durations ===========================================================================
4.07s setup    mne/decoding/tests/test_base.py::test_get_coef
1.32s call     mne/decoding/tests/test_base.py::test_get_coef
0.21s call     mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.02s call     mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_linearmodel
0.00s teardown mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s setup    mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_linearmodel
0.00s teardown mne/decoding/tests/test_base.py::test_get_coef

Results (6.03s):
       3 passed

It seems like to close to the time duration in master. I come up with some possible directions I can try with, such as reducing the testing sample size, removing some tests for the possible types of estimators, etc. @larsoner do you have other suggestions that I can also try with?

@larsoner
Copy link
Member

I would try those, plus reducing the number of samples and/or features.

If the regressors/estimators you are iterating over are sklearn estimators, you probably don't need to do more than one. We can trust them to adhere to their own API requirements, so testing a single one should work.

@iamsc
Copy link
Contributor Author

iamsc commented Nov 22, 2019

Thanks @larsoner for your suggestions. I have tweaked some tests, including removing some estimators, reducing the parameter space, and reducing the number of samples.

Here is the new time duration:

========================================================================== slowest 20 test durations ===========================================================================
3.22s setup    mne/decoding/tests/test_base.py::test_get_coef
0.79s call     mne/decoding/tests/test_base.py::test_get_coef
0.21s call     mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.02s call     mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_linearmodel
0.00s setup    mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_cross_val_multiscore
0.00s teardown mne/decoding/tests/test_base.py::test_linearmodel
0.00s teardown mne/decoding/tests/test_base.py::test_get_coef

Results (4.43s):
       3 passed

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for bringing down the testing time. Can you add an entry to doc/changes/latest.inc, probably in the BUG section since this seems like a bugfix? You'll probably also need to add your name + URL to doc/changes/names.inc.

Let's wait for @agramfort to have a look before merge since he has (much) more sklearn knowledge than I do

@iamsc
Copy link
Contributor Author

iamsc commented Nov 22, 2019

OK~ No problem.

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides these nitpicks LGTM

# according to the type of estimator.
if is_classifier(clf):
n, n_features = 1000, 3
X = np.random.rand(n, n_features)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a random state to this test has no effect on global state

Copy link
Contributor Author

@iamsc iamsc Nov 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply.
Does this mean that it would be better to use np.random.RandomState(123) rather than np.random.seed(123) before the np.random.rand() function?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically we try to do:

def test_whatever():
    rng = np.random.RandomState(0)
    ...
       X = rng.rand(n, n_features)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! I see~ Let me modify it.

clf.fit(X, y)
assert_equal(clf.filters_.shape, (n_features,))
assert_equal(clf.patterns_.shape, (n_features,))
pytest.raises(ValueError, clf.fit, np.random.rand(n, n_features, 99), y)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here


# check continuous target fit in standard linear model with GridSearchCV
n_targets = 1
Y = np.random.rand(n, n_targets)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem

@@ -181,10 +228,39 @@ def test_linearmodel():
assert_equal(clf.patterns_.shape, (n_features,))
pytest.raises(ValueError, clf.fit, np.random.rand(n, n_features, 99), y)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its now recommended to use with block to catch exceptions

@agramfort agramfort merged commit 3459c84 into mne-tools:master Nov 26, 2019
@agramfort
Copy link
Member

Thx @iamsc !

@iamsc
Copy link
Contributor Author

iamsc commented Nov 27, 2019

I’m happy to contribute to MNE and learn from you folks. Thank @agramfort and @larsoner .

@agramfort
Copy link
Member

agramfort commented Nov 27, 2019 via email

christian-oreilly pushed a commit to christian-oreilly/mne-python that referenced this pull request Dec 8, 2019
…-tools#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.
agramfort pushed a commit that referenced this pull request Dec 14, 2019
* Fixing issues with plot_surface()

* Setting transparent to True instead of False.

* PR review edits.

* PR review edits.

* Improved error management for missing pysufer.

* Update _3d.py

* Update test_3d.py

* Fixing test requires conditions.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* fix : don't require git to install master (#7078)

* [MRG] Fix plot_vector_source_estimates (#7084)

* Initial fix

* Update mesh is not necessary

* Choose to modify scale_factor as post-post-process

* Add simple test for fix

* Use mean of hemi's width

* MRG, BUG: Fix running subprocesses in Jupyter notebooks (#7086)

* BUG: Fix running subprocesses in Jupyter notebooks

* FIX: Flake [ci skip]

* FIX: Adding use_scalebars as a parameter. (#7091)

* Adding use_scalebars as a parameter.

* Fixed to adhere to mne-coding standards.

* Fixing formatting issues.

* Fixing show_scalebars in viz ica from the original naming of  use_scalebars.

* Update mne/viz/ica.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* Update mne/viz/raw.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* DOC: Correct version [ci skip]

* [MRG] Implement iterative reweighted TF-MxNE (#5075)

* ir scheme

* Squash commits

* messed up my rebase

* Address comments Alex

* flake

* implement filtering and write more readable math code

* fix pydocstyle

* High pass filter, remove upsampling, get 4 sources

* TFMxnE > TF-MxNE + rm comment example

* MAINT: Ensure that meas_date=None round-trips if `anonymize_info` is used (#7090)

* BUG: Write out meas_date=None

* FIX: Maybe better?

* DOC: Document

* [WIP] Make equalize_channels capable of operating on Forward, Covariance and CrossSpectralDensity (#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links

* MRG, DOC: revise tutorial: overview of Epoching (#7011)

* rename file

* WIP tutorial overhaul [ci skip]

* link targets

* finish tutorial revisions

* fix glossary ref

* formatting/flow tweaks [skip travis]

* fix codespell

* address neurolaunch review comments

* [MRG] Refactor mayavi/mlab out report (#7008)

* Start refactoring of report

* Fix figure_size bug

* Fix undefined function bug

* Remove unnecessary 3d functions from public API

* Refactor _fig_to_img

* Unify 3d backend testing

* Fix 3d backend testing variable

* Minor refactoring

* Improve _check_3d_figure

* TST: Trigger plot_make_report.py

* TST: Trigger plot_make_report.py

* Fix typo

* Fix bug with figure not closed

* TST: Trigger plot_make_report.py

* Integrate reviews

* crop raw to save memory (#7100)

* MRG, DOC: Update contrib guide (#7097)

* WIP update contributing guide

* refine bug reporting guidelines

* add git setup diagram

* mention dangers of PYTHONPATH

* fix typo

* more on PYTHONPATH

* clarify dev environment setup steps

* tweaks

* remove self-referential crossref

* add "origin"

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel (#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.

* BUG: CTF - set meas_date (#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, DOC: revise tutorial: epochs visualization (#7102)

* delete redundant tutorial

* add explanation of dropped epoch & crossref to drop_log section

* add crossref target

* overhaul epochs viz tutorial

* fix sidebar

* avoid warning

* update crossrefs

* formatting & flow tweaks

* rename file for proper ordering

* fix crossrefs

* make plots look better

* fix codespell

* [MRG] Improve Renderer API (#6761)

* Fix minor bug in sphere()

* Fix dimension in tube()

* Update doc for color

* Add color management as str

* Find better default value for tube() radius

* Correct colorConvertex syntax

* Fix import nesting

* Refactor colro code

* Rework text2d() (x,y) parameter

* Refactor _parse_str_color to _check_color

* Add some tests

* Improve doc

* Add the radius parameter for pyvista

* Fix import

* FIX: Avoid deadlocking (#7103)

* DOC: Spelling (#7106)

* ENH: Add mne sys_info command (#7105)

* ENH: Add mne sys_info command

* FIX: Install

* MRG, DOC: tutorial tweaks (#7109)

* better artifact plots; better thumbnail choice

* keep it pedagogical

* change thumbnail [ci skip]

* MAINT: Test on 3.8 (#7113)

* better info message for rank computation [skip circle] (#7110)

* FIX: Fix for old build (#7120)

* MRG, MAINT: Make calculate_head_pos_ctf public (#7117)

* MAINT: Make calculate_head_pos_ctf public

* FIX: Doc

* DOC: Fix

* FIX: Docstring

* MRG, FIX: Fix sklearn import (#7121)

* ENH: refactor _handle_event_colors (#7111)

* refactor _handle_event_colors

* restore warning

* fix tests

* fix circle

* add test

* minor refactor

* FIX: Allow unknown (#7119)

* MRG, FIX: scaling in summarize_clusters_stc (#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Document this PR change.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* BUG: CTF - set meas_date (#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, FIX: scaling in summarize_clusters_stc (#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Fix doc CI warning about missing target.

* more

* nest check
@iamsc iamsc deleted the add-gridsearchcv branch February 11, 2020 08:17
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
…-tools#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* Fixing issues with plot_surface()

* Setting transparent to True instead of False.

* PR review edits.

* PR review edits.

* Improved error management for missing pysufer.

* Update _3d.py

* Update test_3d.py

* Fixing test requires conditions.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* fix : don't require git to install master (mne-tools#7078)

* [MRG] Fix plot_vector_source_estimates (mne-tools#7084)

* Initial fix

* Update mesh is not necessary

* Choose to modify scale_factor as post-post-process

* Add simple test for fix

* Use mean of hemi's width

* MRG, BUG: Fix running subprocesses in Jupyter notebooks (mne-tools#7086)

* BUG: Fix running subprocesses in Jupyter notebooks

* FIX: Flake [ci skip]

* FIX: Adding use_scalebars as a parameter. (mne-tools#7091)

* Adding use_scalebars as a parameter.

* Fixed to adhere to mne-coding standards.

* Fixing formatting issues.

* Fixing show_scalebars in viz ica from the original naming of  use_scalebars.

* Update mne/viz/ica.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* Update mne/viz/raw.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* DOC: Correct version [ci skip]

* [MRG] Implement iterative reweighted TF-MxNE (mne-tools#5075)

* ir scheme

* Squash commits

* messed up my rebase

* Address comments Alex

* flake

* implement filtering and write more readable math code

* fix pydocstyle

* High pass filter, remove upsampling, get 4 sources

* TFMxnE > TF-MxNE + rm comment example

* MAINT: Ensure that meas_date=None round-trips if `anonymize_info` is used (mne-tools#7090)

* BUG: Write out meas_date=None

* FIX: Maybe better?

* DOC: Document

* [WIP] Make equalize_channels capable of operating on Forward, Covariance and CrossSpectralDensity (mne-tools#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links

* MRG, DOC: revise tutorial: overview of Epoching (mne-tools#7011)

* rename file

* WIP tutorial overhaul [ci skip]

* link targets

* finish tutorial revisions

* fix glossary ref

* formatting/flow tweaks [skip travis]

* fix codespell

* address neurolaunch review comments

* [MRG] Refactor mayavi/mlab out report (mne-tools#7008)

* Start refactoring of report

* Fix figure_size bug

* Fix undefined function bug

* Remove unnecessary 3d functions from public API

* Refactor _fig_to_img

* Unify 3d backend testing

* Fix 3d backend testing variable

* Minor refactoring

* Improve _check_3d_figure

* TST: Trigger plot_make_report.py

* TST: Trigger plot_make_report.py

* Fix typo

* Fix bug with figure not closed

* TST: Trigger plot_make_report.py

* Integrate reviews

* crop raw to save memory (mne-tools#7100)

* MRG, DOC: Update contrib guide (mne-tools#7097)

* WIP update contributing guide

* refine bug reporting guidelines

* add git setup diagram

* mention dangers of PYTHONPATH

* fix typo

* more on PYTHONPATH

* clarify dev environment setup steps

* tweaks

* remove self-referential crossref

* add "origin"

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel (mne-tools#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.

* BUG: CTF - set meas_date (mne-tools#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, DOC: revise tutorial: epochs visualization (mne-tools#7102)

* delete redundant tutorial

* add explanation of dropped epoch & crossref to drop_log section

* add crossref target

* overhaul epochs viz tutorial

* fix sidebar

* avoid warning

* update crossrefs

* formatting & flow tweaks

* rename file for proper ordering

* fix crossrefs

* make plots look better

* fix codespell

* [MRG] Improve Renderer API (mne-tools#6761)

* Fix minor bug in sphere()

* Fix dimension in tube()

* Update doc for color

* Add color management as str

* Find better default value for tube() radius

* Correct colorConvertex syntax

* Fix import nesting

* Refactor colro code

* Rework text2d() (x,y) parameter

* Refactor _parse_str_color to _check_color

* Add some tests

* Improve doc

* Add the radius parameter for pyvista

* Fix import

* FIX: Avoid deadlocking (mne-tools#7103)

* DOC: Spelling (mne-tools#7106)

* ENH: Add mne sys_info command (mne-tools#7105)

* ENH: Add mne sys_info command

* FIX: Install

* MRG, DOC: tutorial tweaks (mne-tools#7109)

* better artifact plots; better thumbnail choice

* keep it pedagogical

* change thumbnail [ci skip]

* MAINT: Test on 3.8 (mne-tools#7113)

* better info message for rank computation [skip circle] (mne-tools#7110)

* FIX: Fix for old build (mne-tools#7120)

* MRG, MAINT: Make calculate_head_pos_ctf public (mne-tools#7117)

* MAINT: Make calculate_head_pos_ctf public

* FIX: Doc

* DOC: Fix

* FIX: Docstring

* MRG, FIX: Fix sklearn import (mne-tools#7121)

* ENH: refactor _handle_event_colors (mne-tools#7111)

* refactor _handle_event_colors

* restore warning

* fix tests

* fix circle

* add test

* minor refactor

* FIX: Allow unknown (mne-tools#7119)

* MRG, FIX: scaling in summarize_clusters_stc (mne-tools#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Document this PR change.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* BUG: CTF - set meas_date (mne-tools#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, FIX: scaling in summarize_clusters_stc (mne-tools#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Fix doc CI warning about missing target.

* more

* nest check
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
…-tools#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* Fixing issues with plot_surface()

* Setting transparent to True instead of False.

* PR review edits.

* PR review edits.

* Improved error management for missing pysufer.

* Update _3d.py

* Update test_3d.py

* Fixing test requires conditions.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* fix : don't require git to install master (mne-tools#7078)

* [MRG] Fix plot_vector_source_estimates (mne-tools#7084)

* Initial fix

* Update mesh is not necessary

* Choose to modify scale_factor as post-post-process

* Add simple test for fix

* Use mean of hemi's width

* MRG, BUG: Fix running subprocesses in Jupyter notebooks (mne-tools#7086)

* BUG: Fix running subprocesses in Jupyter notebooks

* FIX: Flake [ci skip]

* FIX: Adding use_scalebars as a parameter. (mne-tools#7091)

* Adding use_scalebars as a parameter.

* Fixed to adhere to mne-coding standards.

* Fixing formatting issues.

* Fixing show_scalebars in viz ica from the original naming of  use_scalebars.

* Update mne/viz/ica.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* Update mne/viz/raw.py

Co-Authored-By: Daniel McCloy <dan.mccloy@gmail.com>

* DOC: Correct version [ci skip]

* [MRG] Implement iterative reweighted TF-MxNE (mne-tools#5075)

* ir scheme

* Squash commits

* messed up my rebase

* Address comments Alex

* flake

* implement filtering and write more readable math code

* fix pydocstyle

* High pass filter, remove upsampling, get 4 sources

* TFMxnE > TF-MxNE + rm comment example

* MAINT: Ensure that meas_date=None round-trips if `anonymize_info` is used (mne-tools#7090)

* BUG: Write out meas_date=None

* FIX: Maybe better?

* DOC: Document

* [WIP] Make equalize_channels capable of operating on Forward, Covariance and CrossSpectralDensity (mne-tools#7029)

* Add more capabilites to equalize_channels

* Add unit tests for improved equalize_channels functionality

* Fix docstring of equalize_channels

* Add Info capabilities to equalize_channels

* Fix Forward.pick_channels docstring

* Update combine_evokeds unit test

* Fix edge case of pick_channels_cov

* Add dedicated pick_channels_cov unit test

* Add copy parameter to equalize_channels

* Make copy=False the default

* Make grand_average also equalize TFR channels

* Make copy=True the default in equalize_channels

* PEP8

* Update docstring

* Update what's new

* Update unit tests

* Update links to methods in whats_new

* Spell out new supported object types

* Fix links in whats_new again

* Remove attribute links

* MRG, DOC: revise tutorial: overview of Epoching (mne-tools#7011)

* rename file

* WIP tutorial overhaul [ci skip]

* link targets

* finish tutorial revisions

* fix glossary ref

* formatting/flow tweaks [skip travis]

* fix codespell

* address neurolaunch review comments

* [MRG] Refactor mayavi/mlab out report (mne-tools#7008)

* Start refactoring of report

* Fix figure_size bug

* Fix undefined function bug

* Remove unnecessary 3d functions from public API

* Refactor _fig_to_img

* Unify 3d backend testing

* Fix 3d backend testing variable

* Minor refactoring

* Improve _check_3d_figure

* TST: Trigger plot_make_report.py

* TST: Trigger plot_make_report.py

* Fix typo

* Fix bug with figure not closed

* TST: Trigger plot_make_report.py

* Integrate reviews

* crop raw to save memory (mne-tools#7100)

* MRG, DOC: Update contrib guide (mne-tools#7097)

* WIP update contributing guide

* refine bug reporting guidelines

* add git setup diagram

* mention dangers of PYTHONPATH

* fix typo

* more on PYTHONPATH

* clarify dev environment setup steps

* tweaks

* remove self-referential crossref

* add "origin"

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel (mne-tools#7089)

* ENH: Adding support of GridSearchCV for mne.decoding.LinearModel

* (1) adds the GridSearchCV tests for LinearModel class. (2) adds Classification/Regression/GridSearchCV estimators' tests for get_coef function.

* fixed some flake8 errors.

* speeds up the tests.

* tweaks some tests.

* adds an entry to changelog.

* (1) generates the random values under RandomState. (2) uses `with block` to catch exceptions.

* BUG: CTF - set meas_date (mne-tools#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, DOC: revise tutorial: epochs visualization (mne-tools#7102)

* delete redundant tutorial

* add explanation of dropped epoch & crossref to drop_log section

* add crossref target

* overhaul epochs viz tutorial

* fix sidebar

* avoid warning

* update crossrefs

* formatting & flow tweaks

* rename file for proper ordering

* fix crossrefs

* make plots look better

* fix codespell

* [MRG] Improve Renderer API (mne-tools#6761)

* Fix minor bug in sphere()

* Fix dimension in tube()

* Update doc for color

* Add color management as str

* Find better default value for tube() radius

* Correct colorConvertex syntax

* Fix import nesting

* Refactor colro code

* Rework text2d() (x,y) parameter

* Refactor _parse_str_color to _check_color

* Add some tests

* Improve doc

* Add the radius parameter for pyvista

* Fix import

* FIX: Avoid deadlocking (mne-tools#7103)

* DOC: Spelling (mne-tools#7106)

* ENH: Add mne sys_info command (mne-tools#7105)

* ENH: Add mne sys_info command

* FIX: Install

* MRG, DOC: tutorial tweaks (mne-tools#7109)

* better artifact plots; better thumbnail choice

* keep it pedagogical

* change thumbnail [ci skip]

* MAINT: Test on 3.8 (mne-tools#7113)

* better info message for rank computation [skip circle] (mne-tools#7110)

* FIX: Fix for old build (mne-tools#7120)

* MRG, MAINT: Make calculate_head_pos_ctf public (mne-tools#7117)

* MAINT: Make calculate_head_pos_ctf public

* FIX: Doc

* DOC: Fix

* FIX: Docstring

* MRG, FIX: Fix sklearn import (mne-tools#7121)

* ENH: refactor _handle_event_colors (mne-tools#7111)

* refactor _handle_event_colors

* restore warning

* fix tests

* fix circle

* add test

* minor refactor

* FIX: Allow unknown (mne-tools#7119)

* MRG, FIX: scaling in summarize_clusters_stc (mne-tools#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Document this PR change.

* Document this PR change.

* Update doc/changes/latest.inc

Co-Authored-By: Eric Larson <larson.eric.d@gmail.com>

* BUG: CTF - set meas_date (mne-tools#7104)

* BUG: CTF - set meas_date

* Comment: not to revisit testing post potential mne-c updates

* Whats New

* MRG, FIX: scaling in summarize_clusters_stc (mne-tools#7125)

* remove hardcoded 1e3; improve docstring

* touch tutorials to trigger rendering

* update what's new

* actually use milliseconds

* Fix doc CI warning about missing target.

* more

* nest check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding support of GridSearchCV for mne.decoding.LinearModel

3 participants