Skip to content

Conversation

@agramfort
Copy link
Member

@agramfort agramfort commented Jan 25, 2019

the idea is to rely on this single function to compute rank of data / cov

@codecov
Copy link

codecov bot commented Jan 26, 2019

Codecov Report

Merging #5876 into master will increase coverage by 0.08%.
The diff coverage is 92.39%.

@@            Coverage Diff             @@
##           master    #5876      +/-   ##
==========================================
+ Coverage   88.67%   88.76%   +0.08%     
==========================================
  Files         401      401              
  Lines       72527    72555      +28     
  Branches    12132    12142      +10     
==========================================
+ Hits        64311    64400      +89     
+ Misses       5272     5229      -43     
+ Partials     2944     2926      -18

@LauriParkkonen
Copy link
Member

There are still some issues with this new function. The mixed MEG&EEG is still not handled correctly and the first test against ~zero should compare to fpinfo().tiny instead of .eps. I am working on this so don't merge yet.

@agramfort
Copy link
Member Author

agramfort commented Jan 26, 2019 via email

@agramfort
Copy link
Member Author

agramfort commented Feb 5, 2019 via email

@larsoner
Copy link
Member

larsoner commented Feb 5, 2019

Sure

@larsoner larsoner force-pushed the rank_refactor_part3 branch from ea361c1 to 5531dc7 Compare February 5, 2019 20:23
@larsoner
Copy link
Member

larsoner commented Feb 5, 2019

This PR (in addition to #4511, where it is much worse) is another example of why #5753 would be a useful time-saving device. I have replaced only some of the rank : with XXX placeholders, and they'll all need to be updated now and anytime we make changes in the future.

@larsoner larsoner force-pushed the rank_refactor_part3 branch from 0116684 to f4f6f86 Compare February 6, 2019 07:19
mne/rank.py Outdated
number of good channels. If a `Covariance`
is passed, this can make sense if it has been (possibly
improperly) regularized without taking into account the true
data rank.
Copy link
Member

Choose a reason for hiding this comment

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

@agramfort this is the docstring that should be scrutinized. Everywhere else there is a rank : XXX will eventually have the same rank : int | None | dict | 'info' | 'full' and description pointing people here for details.

Copy link
Member Author

Choose a reason for hiding this comment

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

besides my comment above. Sounds reasonable.

@larsoner larsoner changed the title [WIP] add new compute_rank function RFC: add new compute_rank function Feb 10, 2019
@agramfort
Copy link
Member Author

agramfort commented Feb 11, 2019 via email

@larsoner
Copy link
Member

Yeah that seems safest

@agramfort
Copy link
Member Author

that's it for my first pass. Really nice progress @larsoner

we should next see how to make sure that rank has the same default for all inverse methods.

@larsoner larsoner changed the title RFC: add new compute_rank function WIP: add new compute_rank function Feb 12, 2019
@larsoner larsoner force-pushed the rank_refactor_part3 branch from 382b39e to 776f843 Compare February 12, 2019 21:59
@larsoner
Copy link
Member

Comments addressed, rebased, and push forced.

Unfortunately I found more problems with our rank having to do with tol. If we compute with tol='auto' meaning "np.float64 tolerance" then most things work, but test_maxfilter_get_rank does not. I added a special way to use the np.float32 tolerance there to work around it.

I also made explicit where we had to add some hacks to deal with not having #5146.

@agramfort ready for one more round of review. If it looks good to you, then after #5753 is in (hopefully today or tomorrow) then I just need to add some %(rank)s's and merge.

@larsoner
Copy link
Member

This pull request introduces 1 alert when merging 51a91e1 into fd91ebe - view on LGTM.com

new alerts:

  • 1 for Unused import

Comment posted by LGTM.com

@larsoner larsoner force-pushed the rank_refactor_part3 branch from 51a91e1 to 92adb26 Compare February 13, 2019 02:41
@larsoner larsoner changed the title WIP: add new compute_rank function MRG: add new compute_rank function Feb 13, 2019
@larsoner
Copy link
Member

Ready for review/merge from my end.

@larsoner larsoner force-pushed the rank_refactor_part3 branch 3 times, most recently from 815314e to 094f626 Compare February 13, 2019 21:50
@larsoner larsoner mentioned this pull request Feb 15, 2019
6 tasks
@agramfort
Copy link
Member Author

ok that's it for me

you'll need to rebase though...

@larsoner larsoner force-pushed the rank_refactor_part3 branch from 094f626 to 64b9c96 Compare February 15, 2019 21:43
@larsoner larsoner merged commit 544989c into mne-tools:master Feb 15, 2019
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