Skip to content

ENH: speed up ica.plot_properties #6268

Closed

Description

@mmagnuski

I currently have to wait some time after clicking a component in ica.plot_components window and the time seems to be mostly from waiting for the multitaper psd estimation to complete. I think that we should use something much simpler like welch or even fft as the default. The plotted spectrum is for informational reasons, not for analysis. I can compare timings on one of my datasets.

Activity

  1. larsoner commented on May 3, 2019

    @larsoner
    Member

    Sounds good to me

  2. cbrnr commented on May 4, 2019

    @cbrnr
    Contributor

    OK, I would be interested in the timings if this is really the bottleneck.

  3. jona-sassenhagen commented on May 4, 2019

    @jona-sassenhagen
    Contributor

    Sure, sounds good.

  4. jona-sassenhagen commented on May 4, 2019

    @jona-sassenhagen
    Contributor

    While you're there, generalise plot_properties to channels please :D

  5. agramfort commented on May 4, 2019

    @agramfort
    SponsorMember
  6. mmagnuski commented on May 4, 2019

    @mmagnuski
    MemberAuthor

    I profiled plot_properties and it seems I was wrong: a lot of time (> 2 s in this case) is spent in bootstrap CI computation:
    image
    We should consider switching to analytic (and possibly one-sided to better represent skewed distributions).
    BTW - 7 seconds here is an exaggeration, 2 seconds were spent in plt_show before I closed the figure.

  7. changed the title [-]ENH: change psd method used in ica.plot_properties from multitapering to welch[/-] [+]ENH: speed up ica.plot_properties[/+] on May 4, 2019
  8. mmagnuski commented on May 4, 2019

    @mmagnuski
    MemberAuthor

    but I still think multitaper should be changed to somthing lighter (welch or fft), people with less experience with multitapersing could be mistaken by the fatter, more square-like peaks that can sometimes arise due to frequency smoothing.

  9. mmagnuski commented on May 4, 2019

    @mmagnuski
    MemberAuthor

    @jona-sassenhagen I can take a stab at that (generalizing to channels) if you insist. :)

  10. jona-sassenhagen commented on May 4, 2019

    @jona-sassenhagen
    Contributor

    I profiled plot_properties and it seems I was wrong: a lot of time (> 2 s in this case) is spent in bootstrap CI computation:

    Uh oh, it's my fault :)

    For the tests, we can pass a different ci function to plot_compare_evokeds here. You wanna do that, or should I?

    We can also default to a different function for the default for plot_properties.

    @jona-sassenhagen I can take a stab at that (generalizing to channels) if you insist. :)

    I insist.

  11. mmagnuski commented on May 4, 2019

    @mmagnuski
    MemberAuthor

    Uh oh, it's my fault :)

    This is what you meant in #6250, right?

    For the tests, we can pass a different ci function to plot_compare_evokeds here. You wanna do that, or should I?

    I can test later today.

    We can also default to a different function for the default for plot_properties.

    That could be useful.

    I insist.

    😅

  12. jona-sassenhagen commented on May 4, 2019

    @jona-sassenhagen
    Contributor

    This is what you meant in #6250, right?

    It is connected to that, yes. Another reason for speeding up epochs iteration.

    Maybe it would also make sense to see if we can speed up the bootstrap ci function.

  13. jona-sassenhagen commented on May 4, 2019

    @jona-sassenhagen
    Contributor

    @mmagnuski I suggest to, in plot_ica_properties, add a ts_args param and default the time series (plot_compare_evokeds) internally to your CI function, unless overwritten to a ci param in ts_args.

  14. jona-sassenhagen commented on May 4, 2019

    @jona-sassenhagen
    Contributor

    I can do it too.

  15. mmagnuski commented on May 4, 2019

    @mmagnuski
    MemberAuthor

    @jona-sassenhagen Sure, If you have a plan, go for it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions