-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG: Refactor forward and cov prep #5947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
26922c5 to
0d63719
Compare
|
This pull request introduces 1 alert when merging 0d63719 into 12a8549 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
|
This pull request introduces 1 alert when merging 0d63719 into 44c2ba4 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
0d63719 to
22cb6b1
Compare
Codecov Report
@@ Coverage Diff @@
## master #5947 +/- ##
==========================================
+ Coverage 88.8% 88.83% +0.03%
==========================================
Files 401 401
Lines 72783 72866 +83
Branches 12167 12178 +11
==========================================
+ Hits 64635 64733 +98
+ Misses 5219 5215 -4
+ Partials 2929 2918 -11 |
|
This pull request introduces 1 alert when merging 22cb6b1 into 44c2ba4 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
94b6bb5 to
b84e2ea
Compare
|
@agramfort is there any reason to keep the |
8190f79 to
4281296
Compare
|
no I don't see the point of keeping the zeros with pca=True. I would suggest to remove this parameter. It should not change the results (in theory) but to be tested. |
4281296 to
f2a445e
Compare
|
Okay @agramfort ready for review/merge from my end. There are a few interesting meaningful differences between the Things with fixed values here are not exposed to the user, others are.
Not sure how best to move forward with unifying these approaches, but at least the differences are now clearly isolated for someone to easily play with. Ready for review/merge from my end. |
2ffcba8 to
b416928
Compare
|
Okay docstrings added, functions added to |
| """ | ||
| # XXX this perhaps should just take ``forward`` instead of ``G`` and | ||
| # ``gain_info``. However, it's not easy to do this given that the | ||
| # mixed norm code requires that ``G`` is whitened before this chunk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New note added -- if we can get mixed_norm not to do the whitening before depth weighting, then we can simplify our code a bit, and make this take forward just like compute_orient_prior does.
|
thx heaps @larsoner ! |
* MAINT: Refactor forward and cov prep * FIX: Spelling * FIX: Fixes after rebase * FIX: Eradicate _get_whitener * FIX: Missed one * WIP: Make _prepare_forward more inclusive * FIX: Unify computations * ENH: Vectorize depth prior calculation * MAINT: Docstrings and unification * DOC: Comments for einsum
When looking into unification of beamformer and minimum norm, I realized we should first clean up some minimum norm stuff:
_prepare_forwardshould not compute the whitener, too. Separate these, and fix minimum norm and inverse sparse._get_whitenershould not be called in our codebase, but rathercompute_whitener, if possible. This means that thecompute_whitenerneeds apcaoption, which is added in MRG: add new compute_rank function #5876. It probably also needs abackprojectoption, too._get_whiteneris used in Fix : simulate evoked with different sensor types + take into account… #5940, so that should be merged before this can be completed.prepare_forward. There is code dup inminimum_norm,mxne_inverse, and_compute_beamformerthat can be merged here.But beamformers shouldn't be modified until MRG+1: ENH: refactor beamformer channel picks with utils #5872 is in.pcaweirdness (is it even necessary?) ininverse_sparse_check_compsand_check_compensation_gradeThis PR is essentially stuck until #5876 and #5940 are merged. EDIT: And later, #5872.The next PR(s) should:
compute_depth_prioroperate onforward, notgain, gain_info, is_fixed_orient