1/f power detrending

241 views
Skip to first unread message

Jingwei Sheng

unread,
Nov 15, 2016, 7:29:57 AM11/15/16
to AnalyzingNeuralTimeSeriesData
Hi Mike,

I have learnt the dB or percentage change method to normalize the 1/f power law for better visualization and frequency domain analysis. But if I need to remove such pink noise to get a clean background power spectrum, what do you suggest to do except a 1/f function fitting? If a curve fitting has to be chosen, is it a good way to fit each channel separately to obtain a background free spectrum for my further analysis (such as iff back to the time domain)?

Thanks,
Jingwei

Mike X Cohen

unread,
Nov 15, 2016, 7:43:10 AM11/15/16
to analyzingneura...@googlegroups.com
Hi Jingwei. It is difficult to remove the 1/f, mainly because it's not actually "1/f". It is an empirical distribution, not a mathematical distribution, and so it can be difficult to fit with a simple function. Furthermore, the function that best fits one power spectrum might not be the function that best fits another power spectrum (e.g., for a different subject, or possibly even a different channel). There is a danger that using a poor-fitting function will introduce an artifact into the residual. 

So I guess my advice is to try to work with the 1/f if possible. If you are subtracting experiment conditions, the 1/f might be removed automatically. Otherwise, I suggest trying a few different ways to remove it and seeing what works. I'm sorry that's not a very principled approach, but I fear you could spend 5 years working on that problem and still not have a solution that works all the time.

Mike



--
You received this message because you are subscribed to the Google Groups "AnalyzingNeuralTimeSeriesData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to analyzingneuraltimeseriesdata+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/analyzingneuraltimeseriesdata.
For more options, visit https://groups.google.com/d/optout.



--
Mike X Cohen, PhD
mikexcohen.com

YShah

unread,
Mar 3, 2017, 12:15:00 AM3/3/17
to AnalyzingNeuralTimeSeriesData
Hi Mike,

For the PSD normalization, I have seen some people do for example 10*log(PSD(f=fi)) / mean(10*log(PSD(f=0 : f=N1))); where N1 is the total frequencies (e.g. 100 Hz)
Also, I have seen some people just remove the DC component of the PSD such as:10* log(PSD(f=fi)) - mean(10*log(PSD(f=0 : f=N1)));

Technically, I am not sure if both of them are safe approaches as far as not interfering with the statistics of our PSD.

Do you have any idea?

Thank you.
Best,
Yalda

Mike X Cohen

unread,
Mar 3, 2017, 2:57:14 AM3/3/17
to analyzingneura...@googlegroups.com
Hi Yalda. Sure, that one might be OK sometimes. 

You can think of two approaches to power normalization, one that is within-frequency (e.g., normalization to a baseline time period that is often used in task-related designs) and one that is across-frequency (typically involving some attempt to remove the 1/f). Within-frequency normalizations work very well and are widely used in neuroscience (e.g., dB or % change).

If there were a simple straightforward and successful method to normalize the entire power spectrum across-frequency, I'm sure it would also be widely used. Instead, attempts to normalize the power spectrum according to other frequencies usually work only in some datasets or for some channels. This is because the 1/f feature of the power spectrum is not driven by a mathematical (and invertible) law, it is an empirically observed and highly dynamic phenomenon. Even the term "1/f" is a gross over-simplification; in reality it's not 1/f, or even 1/f^c for any given c. Furthermore, the shape of the 1/f changes over time (possibly related to the brain being near a "critical" state), so normalizations based on the entire time series are unlikely to be very successful.

So, I wouldn't say to avoid spectrum-based normalizations, but I would strongly recommend to inspect the data carefully to ensure that the normalization didn't introduce any new "features" into the data that might be misinterpreted as brain dynamics.

Sorry I couldn't give you a simple answer on this one ;)

Mike


Yalda Shahriari

unread,
Mar 3, 2017, 9:03:40 AM3/3/17
to analyzingneura...@googlegroups.com

Hi Mike,

Thank you for your explanation. I completely understand the I/f characteristics of the brain signal and also normalizing based on a the baseline. My main question is the mathematical differences between those two approaches I mentioned in my previous email, 1) dividing by the average of the entire PSD, 2) subtract the average of the entire PSD.

I am basically from the mathematical point of view not sure how they are normalizing. For example, the second approach is subtracting a DC value of the PSD, how the PSD is being normalized by this approach? What neural/artifact characteristic concerns are being addressed by this approach? Suppose that we want to compare two different PSDs corresponding to 2 different conditions in one subject. In fact by doing such normalization we are getting rid of what concern of us in the DC shifts?

 

Thank you.

Best,

Yalda


Best Regards,
Yalda Shahriari, Ph.D.


Assistant Professor of Biomedical Engineering
Department of Electrical, Computer & Biomedical Engineering, University of Rhode Island
Affiliate Member of University of California, San Francisco

Ryan Research Assistant Professor of Neuroscience
Affiliate Member of Ryan Institute for Neuroscience
Office: A-102, Kelley Annex, 4 East Alumni Ave, Kingston, RI 02881
Phone: 401 874 5368

Web: http://egr.uri.edu/ele/meet/yalda-shahriari/

 


Mike X Cohen

unread,
Mar 3, 2017, 9:27:02 AM3/3/17
to analyzingneura...@googlegroups.com
Ah, I see. In that case, apologies for the tangential rant...

Are you sure about the parentheses in those equations? 10*log(a/b) is the same thing as 10*log(a) - 10*log(b), which is the definition of a decibel. Doing log(a)/log(b) is a valid equation, but seems less intuitive. For example, when the activity (a) is the same as the baseline (b), then you would want the response to have a value of 0. But log(a)/log(b) is 1 when a==b. 

Anyway, my general opinion is that no normalizations or data transformations are perfect; the important thing is that whatever you do to your data is applied equally to all conditions/time regions/patients/etc. That way, to the extent that any specific normalization is associated with some bias, at least that bias will be applied equally to all of the data.

Mike


Yalda Shahriari

unread,
Mar 3, 2017, 9:58:15 AM3/3/17
to analyzingneura...@googlegroups.com
Thank you Mike, I believe we are getting closer! I agree with you that the important thing is keeping all the analysis consistent across different groups, conditions, etc.
Sorry for the equation 1 we have 10 log(a/mean(b)). However for equation 2 we have 10log(a)-mean(10log(b)). We could have said both are the same when equation 2 was also 10log(a)-10log(mean(b)) but the second term in equation 2 is mean(10log(b)) which is basically subtracting a DC value of the PSD in the log scale. Technically, what would be our concerns that we would like to subtract such DC shift in the PSD?

Thank you!
Best,
Yalda

Mike X Cohen

unread,
Mar 3, 2017, 11:01:44 AM3/3/17
to analyzingneura...@googlegroups.com
I don't think there are any technical concerns with either of those expressions, at least, none that come immediately to mind. In both cases you are subtracting a constant, and the two terms differ only because the log is a nonlinear operation. So, go with whichever you prefer, I guess. Or whichever is more common in your pocket of the literature.

Mike


Yalda

unread,
Mar 3, 2017, 11:05:11 AM3/3/17
to analyzingneura...@googlegroups.com
Got it! Thank you Mike :).

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to analyzingneuraltimes...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages