MultivariateStats.jl
MultivariateStats.jl copied to clipboard
Setting the output dimension for PCA
Is it possible to set the output dimension for a PCA instance? (From the documentation, it seems like PCA's are constructed only by the fit() method, and that method determines the output dimension from pratio.)
Use maxoutdim keyword argument when you're calling fit.
The maxoutdim only limits the number of output components from above, but I want to set it exactly. I realize now that I can use "maxoutdim=7, pratio=1.0" to get exactly 7 output components. Still, it would make sense to be able to achieve this in a more natural way.
Current PCA implementation targets a dimensionality reduction of the data rather than orthogonal transformation of it. Thus, you need to disable reduction step by setting maximum value for pratio parameter.