Astroua / TurbuStat

Statistics of Turbulence Python Package
http://turbustat.readthedocs.io/
MIT License
62 stars 26 forks source link

PCA Subtract Channel Means #33

Closed e-koch closed 9 years ago

e-koch commented 9 years ago

Normalization for PCA is by column of data. Mean subtraction should be by channel instead of the whole cube.

low-sky commented 9 years ago

:+1:

See also new PCA

e-koch commented 9 years ago

Also, should be dividing by N-1 instead of N for the sample covariance. The difference will matter for channels with only a few non-noisy pixels, not so much the others.

low-sky commented 9 years ago

@e-koch -- Note that the Brunt & Heyer PCA implementation does no mean subtraction in calculation of the data. Bessel's correction wouldn't apply then, would it? I'm still testing this in cloudpca

e-koch commented 9 years ago

@low-sky They subtract it in the original paper, but don't use Bessel's correction for the covariance. In the 2013 paper I guess it is assumed? I don't think the output can be called PCs if the channels aren't mean subtracted. It won't be the covariance matrix that's computed.

low-sky commented 9 years ago

@e-koch That's fair. I'm going to see how it changes things. The claim in Brunt & Heyer (2003) is that it only shows up in the outer scale, which is what's important for the first eigenvalue and the size / line-width used in Dario's work.

e-koch commented 9 years ago

Addressed in #35 , #36.