You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, the overlapping oscillations issue is really annoying. As much as I want to avoid an iterative procedure that requires more than one call to the gaussian multi-fitting function, we may need to, in some cases.
My proposed solution is to take the gaussian output from from FOOOF--which may have many noisy overlapping gaussian fits--and do kernel density estimation on that output. It looks like this on the right:
This integrates those overlapping gaussians, and then we can try running FOOOF on that, again.
seaborn has some nice KDE code that only has a scipy dependency, so it doesn't change our dependencies at all.
from scipy import stats, integrate
support = np.linspace(np.min(frequency_vector), np.max(frequency_vector), np.size(frequency_vector))
bandwidth = 1.06 * x.std() * x.size ** (-1 / 2.)
kernels = []
for i in x:
kernel = stats.norm(i, bandwidth).pdf(support)
kernels.append(kernel)
density = np.sum(kernels, axis=0)
density /= integrate.trapz(density, support)
The text was updated successfully, but these errors were encountered:
Okay, the overlapping oscillations issue is really annoying. As much as I want to avoid an iterative procedure that requires more than one call to the gaussian multi-fitting function, we may need to, in some cases.
My proposed solution is to take the gaussian output from from FOOOF--which may have many noisy overlapping gaussian fits--and do kernel density estimation on that output. It looks like this on the right:
This integrates those overlapping gaussians, and then we can try running FOOOF on that, again.
seaborn has some nice KDE code that only has a scipy dependency, so it doesn't change our dependencies at all.
The text was updated successfully, but these errors were encountered: