# MFCCs and mean normalization

I'm reading a blog about extracting MFCCs features for Machine Learning applications, but I didn't understand the following points about the mean normalization:

To balance the spectrum and improve the Signal-to-Noise (SNR), we can simply subtract the mean of each coefficient from all frames.

mfcc -= (numpy.mean(mfcc, axis=0) + 1e-8)

• What does he mean by "balance the spectrum and improve the Signal-to-Noise (SNR)"?
• Before feeding the MFCCs features to my neural network, I'm doing min-max normalization for the whole features in the dataset instead of normalizing each file alone (like what the author does above), and I'm not sure which method gives more accurate results.
• Why did he add the epsilon value 1e-8, and didn't divide by the standard deviation?
• Related
– jojek
Jan 28 '20 at 10:55

I'm reading a blog about extracting MFCCs features for Machine Learning applications, but I didn't understand the following points about the mean normalization:

Do not read random blog posts, read books instead. At least they are reviewed by the publisher.

What does he mean by "balance the spectrum and improve the Signal-to-Noise (SNR)"?

Not spectrum is balanced but features. Signal to noise ratio remains the same after this operation.

Before feeding the MFCCs features to my neural network, I'm doing min-max normalization for the whole features in the dataset instead of normalizing each file alone (like what the author does above), and I'm not sure which method gives more accurate results.

Per-file normalization is often better if per-band amplitude of files in the database is different. At the same time if files are small per-file estimate might be inaccurate, then per-dataset normalization might be better.

Why did he add the epsilon value 1e-8, and didn't divide by the standard deviation?

He just does mean normalization, not variance normalization, so he doesn't divide. As per 1e-8, it is totally meaningless.

• Could you give more details and a useful reference for the block: "Per-file normalization ... etc.", please? However, each wave file in my dataset is one-second length speech command (one-word per file). Thank you. Jan 27 '20 at 18:10
• And does per-file normalization instead of per-dataset normalization affect the training process (i.e. slow down)? Jan 27 '20 at 19:49
• Speed is the same. As for per-file vs per-database it is basic math, there are no references. 1 second is pretty short for per-file normalization, you might not get improvement from it. Jan 27 '20 at 21:17

Why did he add the epsilon value 1e-8

This is so you don't end up taking log of zero later, although since the first operation isn't guaranteed to be >=0, I'm not sure if it's necessary or helpful