-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expose number of ICA iterations as ICA.n_iter_ #7328
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
Codecov Report
@@ Coverage Diff @@
## master #7328 +/- ##
==========================================
+ Coverage 89.88% 89.92% +0.03%
==========================================
Files 450 450
Lines 81264 81437 +173
Branches 12918 12942 +24
==========================================
+ Hits 73046 73230 +184
+ Misses 5396 5386 -10
+ Partials 2822 2821 -1 |
|
Tests are failing bc |
|
See how _skip_check_picard is used |
Yep I did see that, what's the particular reason picard tests are omitted so often? |
|
It shouldn't be that often on CIs. Just one Travis run (minimal dependencies). But we need to see the check anywhere it will be used |
|
@larsoner ok thanks, should all be good now |
|
Feel free to rebase or merge now that #7329 is in, then all methods can all have |
|
@larsoner Rebased and squashed commits. |
|
Looks like it might disappear during I/O round trip, can you check? |
|
@larsoner I don't have permission to restart CI, could you please restart the one failing Travis job? |
larsoner
left a comment
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.
Still want to see a test that asserts that n_iter_ exists and is not None after I/O round-trip
Oh now I understand, thought you were referring to something CI-related when you first brought this up. You want me to add a test showing that saving to and loading from disk preserves the new attribute, right? I hadn't thought about that and I'm quite certain it does not. Need to look into this. |
|
@larsoner mne-python/mne/preprocessing/ica.py Lines 1556 to 1557 in d9e729f
I therefore don't understand why mne-python/mne/preprocessing/ica.py Lines 2030 to 2033 in d9e729f
|
I'm not sure why this is done. Is it a sticking point for this PR? In any case, we do want to make it so that objects that were made in MNE 0.19 and earlier can still be read. If it's not clear what you need to do to write out and verify |
No, not at all. I just happened to see this code and thought, oh, that looks kinda odd :) |
larsoner
left a comment
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.
LGTM +1 for merge once the relevant tests pass.
I expect some unrelated failures due to NumPy wheels and also what should be fixed by #7335
|
Thanks @hoechenberger |
* Expose number of ICA iterations as ICA.n_iter_ * Write attribute to disk during ICA.save() * Remove whitespaces
* Expose number of ICA iterations as ICA.n_iter_ * Write attribute to disk during ICA.save() * Remove whitespaces
What does this implement/fix?
The changes in this PR enable the user to retrieve the number of completed ICA iterations via
ICA.n_iter_afterICA.fit()has been called.Currently only works with FastICA and Picard (will always beNonefor Infomax)