PCA Whitening Task

From GM-RKB
Jump to navigation Jump to search

A PCA Whitening Task is a data processing task that ...



References

2016

  • http://lamda.nju.edu.cn/weixs/project/CNNTricks/CNNTricks.html
    • Another pre-processing approach similar to the first one is PCA Whitening. In this process, the data is first centered as described above. Then, you can compute the covariance matrix that tells us about the correlation structure in the data:
      • X -= np.mean(X, axis = 0) # zero-center
      • cov = np.dot(X.T, X) / X.shape[0] # compute the covariance matrix
    • After that, you decorrelate the data by projecting the original (but zero-centered) data into the eigenbasis:
      • U,S,V = np.linalg.svd(cov) # compute the SVD factorization of the data covariance matrix
      • Xrot = np.dot(X, U) # decorrelate the data
    • The last transformation is whitening, which takes the data in the eigenbasis and divides every dimension by the eigenvalue to normalize the scale:
      • Xwhite = Xrot / np.sqrt(S + 1e-5) # divide by the eigenvalues (which are square roots of the singular values)

2005