Skip to content

Conversation

@kingjr
Copy link
Member

@kingjr kingjr commented Jul 1, 2016

sklearn.cross_validation.ShuffleSplit shuffle the epochs order and broke Xdawn.

cc @kaichogami @alexandrebarachant

@codecov-io
Copy link

codecov-io commented Jul 1, 2016

Current coverage is 86.67%

Merging #3373 into master will increase coverage by 34.43%

@@             master      #3373   diff @@
==========================================
  Files           335        335            
  Lines         57628      57635       +7   
  Methods           0          0            
  Messages          0          0            
  Branches       8721       8782      +61   
==========================================
+ Hits          30105      49957   +19852   
+ Misses        25694       5003   -20691   
- Partials       1829       2675     +846   

Sunburst

Powered by Codecov. Last updated by 1a641d7...bd8d5e9

"""

# Ensure epochs order
epochs = epochs[np.argsort(epochs.events[:, 0])]
Copy link
Member

Choose a reason for hiding this comment

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

just sort if not sorted already. Otherwise you make a copy for nothing.

something like

np.all(np.diff(epochs.events[:, 0]) >= 0)

@agramfort
Copy link
Member

@kingjr I think you found your bug :)

@agramfort agramfort merged commit b6bab37 into mne-tools:master Jul 1, 2016
@agramfort
Copy link
Member

thx @kingjr

jona-sassenhagen added a commit to jona-sassenhagen/mne-python that referenced this pull request Jul 5, 2016
* 'master' of git://github.com/mne-tools/mne-python: (48 commits)
  FIX: Flake
  fix pep8
  [MRG] FIX Topographic plotting for KIT-UMD data (mne-tools#3349)
  QUICKFIX: logging test
  Error message for simulate evoked. (mne-tools#3372)
  Warnings for big bems. (mne-tools#3374)
  Add test for baseline correction.
  Use apply_baseline in read_evokeds.
  Makes (None, 0) the default value baseline in apply_baseline.
  [FIX] Adds apply_baseline to Evoked
  fix component inds in ica tutorial (mne-tools#3379)
  FIX: Xdawn with shuffled epochs (mne-tools#3373)
  FIX consistency:  Epochs.load_data() should always return self (mne-tools#3376)
  MRG: Build relevant examples (mne-tools#3365)
  [MRG] set vmin, vmax after smoothing in plot_epochs_image (mne-tools#3360)
  [FIX] Attempt to fix circle.
  fixing a bg plotting bug for topo plots
  Modified test and tutorial.
  [MRG] convert surface using python. (mne-tools#3273)
  [MRG] raw.plot_psd() with flat channel (mne-tools#3342)
  ...
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.

3 participants