fooof-tools / Development

Development ideas for parameterizing neural power spectra.
0 stars 0 forks source link

Explore non-equidistant inputs for frequency spacing #3

Open TomDonoghue opened 4 years ago

TomDonoghue commented 4 years ago

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:

jtmiles commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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