1
$\begingroup$

I am trying to use PCA to compress pictures and audio. For example in the case of audio, the audio is cut into blocks and then the blocks are fed into the data array as new cases.

Question: The data matrix for PCA is generally centered, sometimes even normalized. For compression application, should this centering and normalization be done, given that I want to store the original data and not a transformed version? If the centering is applied should I project the centered data or the original data?

$\endgroup$

1 Answer 1

1
$\begingroup$

For compression application, should this centering and normalization be done,

Yes, it should be done by default. The only problem with centering could be if your data is sparse (centering messes up sparsity), but images typically aren't stored in sparse arrays.

As to why you should do it? This question has been asked multiple times, see for example How does centering the data get rid of the intercept in regression and PCA?

For compression application, should this centering and normalization be done, given that I want to store the original data and not a transformed version?

The point of compression is to store less data per example, so you have to store transformed data and be able to restore it.

This is not a problem with standarisation - mean subtraction and dividing by feature's standard deviation is reversible.

What you'd want to do is given your compressed data (coefficients of principal components) retrieve data using PCA, and then add the mean and scale it according to standard deviation. This means that your decompression algorithm, in addition to storing principal components, has to store two more matrices (the one containing means and the one containing standard deviations).

$\endgroup$
2
  • $\begingroup$ Bartzuk Thank you! I am hearing some crackle with the audio compression. Do you think this is normal / related issue? $\endgroup$
    – Dole
    Commented Mar 25, 2018 at 10:37
  • 1
    $\begingroup$ I don't know, but I would be surprised if significantly compressed signals didn't have any problems, since the preferred methods for such data rather use Fourier Transform-based compression than PCA (jpeg, mp3 etc) $\endgroup$ Commented Mar 25, 2018 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.