2

I have to create 13 white Gaussian noises which are completely decorrelated to each others. I've been told that PCA can achieve it so I searched some information and tools which I can use in python. I use PCA module from sklearn to perform PCA.The following is my code.

import numpy as np
from sklearn.decomposition import PCA

n = 13 # number of completely decorrelated noises
ms = 10000 #duration of noise in milli-seconds
fs = 44100 # sampling rate

x = np.random.randn(int(np.ceil(fs*ms/1000)),n)

# calculate the correlation between any two noise
for i in range(n):
    for j in range(n):
        omega = np.corrcoef(x[:,i],x[:,j])[0,1]
        print omega

# perform PCA
pca = PCA(n_components=n)
pca.fit(x)
y = pca.transform(x)

for i in range(n):
    for j in range(n):
        omega_new = np.corrcoef(y[:,i],y[:,j])[0,1]
        print omega_new

The correlation coefficients before PCA is around 0.0005~0.0014, and reduced to about 1e-16 after performing PCA. I don't know about PCA very well, so I'm not sure whether I did it right. In addition, after performing PCA transformation, are those new data sets still Gaussion white noises? I will normalize each noise so that their maximum amplitude is 0.999 before write them into wave files. Do I still get 13 Gaussian white noises with similar average power?

1 Answers1

0

I might be doing a strawman, but here's an attack on a much reduced problem: if I average two gaussian noises, do I get a gausian noise?

If we isolate the new noise, it is undoubtedly gaussian. If we assume precise calculations (no floating point error), I believe there is no way the new noise could be distinguished from a freshly generated noise.

However, if we look at it in relation to one or both of the noises we averaged, it becomes obvious that it's their average.

I'm not sure about how exactly PCA works, but the transformation seems also to be linear in nature.

TBH, I don't know enough about PCA to comment on your situation, but I'm hoping that further edits would help extend this answer to fit your question.

Cedar
  • 748
  • 6
  • 21