Warning overflow encounter with infomax

,

Hi,
I’m performing an ICA (infomax) on resting-state eeg data (epoch length=2 seconds)
The process is running, but I have the following warning message:

C:\Users\win\anaconda3\lib\site-packages\mne\preprocessing\infomax_.py:192: RuntimeWarning: overflow encountered in exp
y = 1.0 / (1.0 + np.exp(-u))

I run my script on jupyter notebook on Windows 11 Insider Preview 22621.1
What should I do to avoid this warning message. May I still rely on the ica results?

Thanks for your help

Fred

:question: If you have a question or issue with MNE-Python, please include the following info:

  • MNE version: e.g. 0.24.0
  • operating system: e.g. macOS 12 / Windows 10 / Ubuntu 18.04

:page_facing_up: Please also provide relevant code snippets – ideally a minimal working example (MWE).

:fountain_pen: To get the correct formatting, paste your Python code, then select it, and click on the Preformatted text toolbar button.

:no_mobile_phones: Please avoid sharing screenshots of code and error messages! Screenshots are difficult to work with especially on mobile devices; they don’t allow others to copy code and other text; and they don’t show up in the search.

:point_right: :point_right: :point_right: Please edit or remove the above text before submitting your posting. :point_left: :point_left: :point_left:

I think you can certainly ignore this warning but I would say we need to use this function:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.expit.html#scipy-special-expit

which should be more numerically stable.

could you submit a pull request to make the change?

Alex

Hi Alex,
Thank you for your answer. This is the second time I’m using the forum… Is there a way to submit a pull request?

I’ve opened an issue on GitHub:

1 Like