Skip to content
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

Explore non-equidistant inputs for frequency spacing #3

Open
TomDonoghue opened this issue Dec 10, 2019 · 3 comments
Open

Explore non-equidistant inputs for frequency spacing #3

TomDonoghue opened this issue Dec 10, 2019 · 3 comments

Comments

@TomDonoghue
Copy link
Member

Copied over from fooof-tools/fooof#76, original post by @Tdonoghue, based on conversations with @rdgao:

Inputs PSDs currently require linearly spaced frequency points. This is not necessarily ideal, at least when thinking about fitting much broader frequency ranges.

Notes from Richard:
Fitting the Lorentzian (no knee) in semilog is mathematically equivalent to fitting a line in log-log (it still uses every frequency point). The specific issue is not from fitting in log-log, but in using linearly-spaced frequency points. The error between 10-20Hz weighs just as much as the error between 80-90Hz, which is potentially undesirable, given our a priori knowledge about brain PSDs.

For future version of FOOOF, we should consider:

  • Is there anything fundamental about using linearly spaced frequencies? How can we, and should we think about moving to supporting different frequency scales. [As of right now, the algorithm definitely presumes even-spaced - it's an open question how fundamental this is].
  • When and how do we want to accept, or even encourage different frequency spacing.
@TomDonoghue TomDonoghue changed the title Frequency Spacing: Explore non-equidistant inputs Explore non-equidistant inputs for frequency spacing Feb 11, 2020
@jtmiles
Copy link

jtmiles commented Aug 30, 2024

I have no clue if this space is monitored anymore, but, I think this is a great idea (at least empirically; I might not be qualified to judge mathematically)! I suspect interpolating the low frequency portion of the spectrum prior to the regression/curve-fit would yield more accurate aperiodic fits when there are clear knees in the 4-10 Hz range. Or, on the other hand, I think not doing so gives a false sense of security for the RMSE estimates - fits that are clearly bad in the low frequency range still look alright if the total error is all you're interested in for exactly the reason mentioned in the original post. Anyway, I think this would be a useful option if you're still considering!

@voytek
Copy link

voytek commented Sep 16, 2024

This space is, in fact, still monitored! We will be exploring this more as we move from fooof to specparam, so keep an eye out over there: https://github.com/specparam-tools

@jtmiles
Copy link

jtmiles commented Sep 16, 2024

Thanks for the reply Dr. Voytek, and glad to hear it! Eagerly awaiting the updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants