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
ica.plot_properties ignores reject dict #5815
Comments
Ok, so we should add
|
Yes, maybe reject could default to None or False and the image could then not show the dropped epochs at all? And reject=True means it pulls reject from the ICA object. I'm not sure how well NaNs play with the smoothing.
|
with
Right, that won't be good, the NaNs would spread like a disease. It would be possible to reject the segments, then smooth and then add rows with nans to the matrix. I think it might be useful to see what was rejected, but then some people would surely prefer not to, so that might require additional kwarg, so maybe we should think about it later?
Yes, that's what I suggested in the next point (but didn't go back to the previous one to edit for clarity :) ). |
If you want to have a parameter, I would suggest not changing the semantics. The param |
@jasmainak Yes, that would be simpler. A middle-ground is to to have |
But I'd give my vote to just |
fully agree with @jasmainak a reject param is a dict or None
if reject was used during fit it must be used by default in
plot_poperties now we can decide if we mark bad epochs in red or
anything else or just ignore them.
+1 however to be able to pass a different reject in the plot_properties method
|
@agramfort This is the point I am not sure of: at least when the dropping of segments/epochs would be silent (nothing in the visual output suggesting that something was removed). That might be surprising, especially for users accustomed to how things used to work in mne. Using |
My main point is, I'd consider it very dangerous if plot_properties displays activity as if it had no artefacts. I.e., if you end up dropping all high-variance/high-amplitude epochs, the EOG ICs will look flat. So you will misidentify them. I.e., I am very skeptical of dropping by default. |
good point, I agree with Jona. |
you could make the dots in the variance plot red and write the percentage
of epochs that have been dropped?
I'd like to see by default what the ICA solver had as input.
|
Yes, I am less against making this the default when it is clearly visible that something was dropped. |
Yep, I'll work on it tommorow 😄 |
Maybe we should consider using a reject_args instead of a reject, and include inside 'decim', 'reject', 'flat', 'tstep' and maybe 'picks' i.e channels to be used ? |
@Okamille keep is simple and stupid (KISS) and think about YAGNI (https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it). In other words let's add an option when it appears necessary as it is with the reject values for your experiment. I would address the comments you have now ASAP show how it addresses the issue to convince us and move on ! |
I would change the texts. ylabel should be:
I would have left the red dot at their original values as like this it's hard to know if the reject threshold is conservative or not. @dengemann or @jona-sassenhagen or @mmagnuski any option? |
I agree, having red dots at zero doesn't tell me much - it may almost suggest that these epochs/segments were flat.
so it shouldn't be much of a problem, because you perform similar inserting for scatter. In case you you wanted to plot image nan elements in a different color than the default here is a nice example. |
So what do you think of this proposal ? Rejected epochs in image are white by default, I can use your tip @mmagnuski if you want another color :) |
Is the spectrum calculated with the inclusion of missing values?
|
No, it is computed from the "clean" epochs |
All looks good. I have only one question: |
Oh yes, it's weird, I may have made some mistakes when adding the NaNs, I'll look into it |
I would also suggest having consistent color between the subplots (red?) for bad epochs. Maybe work with facecolor and edgecolor to make it work? |
when you plot component properties you can specific the reject param used in fit.
reject should be set as attribute of ica object and be used with ica.plot_properties
cc @pierreablin @Okamille @jona-sassenhagen
The text was updated successfully, but these errors were encountered: