-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Store the scores alongside the components chosen by find_bads_eXg methods. #9846
Comments
no objection to this but it will need FIFF adjustments I suspect
… |
We (@mscheltienne , @jacobf18, @anandsaini024) are setting up https://github.com/jacobf18/iclabel-python to now contain an exact port of the "ICLabel" pipeline in EEGLab, but now in Python. I think this will be an amazing feature addition to the MNE toolkit. Moreover, we are then in a position to improve the model, making component labeling more and more an automated process. We're interested in pursuing this Issue to tighten up the integration of We are wondering if it will be possible to move |
Also I forgot to say: the current tests "demonstrate" that the pipeline exactly matches that of EEGLab. Sorting out API kinks. Perhaps we can discuss in the core-dev meeting sometime. |
no real objection
can you do a pass on readme (make sure links work), put a doc and examples
online?
… Message ID: ***@***.***>
|
https://adam2392.github.io/mne-icalabel/dev/index.html Is the preliminary docs, and everything else should link up to |
Not sure why the example is not rendering, but the docs are consolidated now. Here is an example in action: https://output.circle-artifacts.com/output/job/7cd5cc2f-d66a-4644-a428-9dba14f6c765/artifacts/0/dev/auto_examples/iclabel_automatic_artifact_correction_ica.html#sphx-glr-auto-examples-iclabel-automatic-artifact-correction-ica-py Many links all lead to |
If you transfer to me your repo I will then transfer it to mne-tools org
|
Thanks @agramfort ! will do so after making v0.1 release on pypi(?). Just tidying up the docs/api/datasets. |
Once that's done, LMK and I can create a |
Kay v0.1 up, docs updated and transfer request to @agramfort was sent. Lmk if there's anything missing! |
Ok transfer done
|
Hi, reviving this thread now that the mne-icalabel API has evolved a bit to expose what is needed on MNE-Python side. Besides storing the scores with an array:
WDYT @agramfort, @larsoner @drammock ? cc: @mscheltienne |
once you store it this way what to expect in terms of usage? this would
come with some visualization?
the labels could be set automatically or manually?
… Message ID: ***@***.***>
|
Once you have them: mne API would allow you to visualize and save to disc. To get the labels/scores: these would be set using a variety of methods. E.g. right now there's methods to set for ecg using an existing ecg electrode as a template I think. It can also be set automatically with mne-icalabel. And finally, the labels can be set with the ICA labeling GUI as well. So the label scores is an optional array set by scoring methods. |
ok so np.argmax(labels_scores_, axis=1) may be overruled by labels_ with
manual adjustment.
is that what you mean?
…On Mon, Jul 18, 2022 at 10:36 PM Adam Li ***@***.***> wrote:
Once you have them: mne API would allow you to visualize and save to disc.
To get the labels/scores: these would be set using a variety of methods.
E.g. right now there's methods to set for ecg using an existing ecg
electrode as a template I think. It can also be set automatically with
mne-icalabel. And finally, the labels can be set with the ICA labeling GUI
as well.
So the label scores is an optional array set by scoring methods.
—
Reply to this email directly, view it on GitHub
<#9846 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABHKHAQU3JXRF3XOA2TW33VUW53NANCNFSM5F7RL34Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'm inclined to say yes, because you could automatically annotate with a method and then manually double check. If you automatically annotate with a method then my intuition is that they should match exactly. |
works for me.
… Message ID: ***@***.***>
|
Actually an additional issue is that I am not 100% sure why there would ever be multiple labels for the same component. In addition, would this affect our proposal? I'm guessing no, but not 100% sure. I think I am proposing the following constraints on the
|
it is explained in the very next paragraph after your screenshot:
|
Sorry I meant I'm not 100% sure what the use case then would be. The paragraph states that it is added by methods, but ike if someone/some-method said it was "eog" and "blink", how does that benefit the researcher per say? Or perhaps that's irrelevant question and highly dependent on whatever the researcher is doing? If this train of thought is irrelevant though for our proposal of:
then nvm :p. |
I think the use case is going to be researcher-dependent. And IIUC, all you need is to be able to add entries to |
IMO, default documented entries would bring more good than harm. |
Following a discussion on the forum with @hoechenberger I could not find a way to recover the information I was looking for.
Following an ICA, I saved to disk both the
ICA
instance and theraw
instance on which the ICA is applied.I wanted to check how well the adaptative Z-score threshold worked (I like smart algo, but I don't trust them blindly). After posting on the forum, and looking for a while, I could retrieve the separation between excluded components corresponding to EOG-related activity and ECG-related activity. This information is stored in
ica.labels_
. However, I could not recover the scores that lead to this component selection.I ended up rerunning part of my pipeline and saving the scores separately, but it was very surprising for me that I could not recover this information from the
ICA
instance. After looking a bit into the code, it was clear to me that the scores were not saved anywhere. I propose to add an additional attribute similar tolabels_
but for the scores.The text was updated successfully, but these errors were encountered: