# Should i normalize FFT signal with z-score?

I am working with EEG data (time domain) in a machine learning task, where each input signal must be mapped to a class/frequency. I am using FFT in order to get data in frequency domain and make classification easier.

I'd like to know if it is necessary to normalize data after (or before) applying FFT with z-score normalization (subtract mean and divide by std) in order to center data with zero mean and unit variance.

I know that machine learning models perform a lot better with normalized data, but i don't know if this is the proper way of working with frequency data.

I can provide more details if needed, but i'm using default scipy.fft and sklearn.preprocessing.StandardScaler modules in python.

Probably not.

Applying Z-score to an FFT is problematic. The FFT is a complex signal and you need to define exactly how to normalize.

For example you could normalize the complex frequency domain signal directly. However that doesn't make much sense. Example: the FFT of a unit impulse $$\delta(n)$$ has a mean of 1 and a standard deviation of 0. If you time shift by one sample the mean of the FFT becomes 0 and the standard deviation is 1. I don't think you want minor time shifts make that dramatic a difference.

The next option would be to normalize the power spectrum. Z-score is not a great fit for that either: power spectra are always positive and if you take out the mean, it's not a power spectrum any more.

The 3rd option would be to normalize to log power/amplitude spectrum. That's at least mathematically plausible but I don't think the physics would warrant that either.

The best normalization is one that is based on the physical/physiological understanding of the features and the underlying mechanism. Blindly applying a z-score probably doesn't help much.

Example: if the phenomenon is related to absolute activity levels in the brain, than any normalization procedure must maintain the absolute level. If the phenomenon is related to the relative difference of two events/activities than the normalization should be using the "reference" activity or event.

Some options:

• EEG signals often have a lot of bias. Use a DC blocking filter to eliminate this
• Normalize to the same overall power
• Normalize to the power of some "background" activity
• Normalize to the power of a "reference frequency" band
• Stay fully calibrated. Make sure that your FFT represents the actual spectral density in the brain measured in $$V/\sqrt{Hz}$$