PCA
API/Reference
ADI.PCA
— TypePCA(ncomps; options...)
PCA(;ncomps=nothing, options...)
Use principal components analysis (PCA) to form a low-rank orthonormal basis of the input. Uses deterministic singular-value decomposition (SVD) to decompose data.
If ncomps
is nothing
, the basis will not be truncated (i.e. ncomps
is equal to the number of frames). ncomps
can be set to :noise
or :pratio
to automatically choose the number of components using the residual frame noise or principal ratio, respectively. For more information, see the extended help.
References
- Soummer, Pueyo, and Larkin (2012) "Detection and Characterization of Exoplanets and Disks Using Projections on Karhunen-Loève Eigenimages"
Extended help
Optimizing ncomps
There are a few ways to optimize ncomps
using the input data. Additional options for the optimization are listed below
ncomps=:noise
- residual noise optimizationncomps=:pratio
- principal ratio optimization
Residual noise optimization
This technique progressively increases ncomps
at each step measuring the pixel-to-pixel noise (standard deviation) in the residual data. Iteration will stop when the noise is not improving beyond a threshold. This is suited for data with similar statistical characteristics, such as an annulus more so than a full-frame cube.
collapse=false
- if true, the temporal median of the residual data will be used for measuring the noise.noise_error=1e-3
- the threshold for the minimal noise improvement looking back 2 iterations
Principal ratio optimization
This technique chooses the number of components required to explain some ratio of the total variance in the data. This is known as the principal ratio or the explained variance ratio. The explained variance is measured by transforming the singular values of the SVD decomposition (Λ = @. S^2 / (n - 1)
).
pratio=0.9
- the target principal ratio (between 0 and 1)