amcphail / hstatistics

Statistics package for Haskell based on hmatrix
BSD 3-Clause "New" or "Revised" License
13 stars 3 forks source link

Provide function to return n largest PCA components #1

Closed mruegenberg closed 11 years ago

mruegenberg commented 11 years ago

Most users of Numeric.Statistics.PCA would probably expect a function that returns the n largest components instead of all components greater than a threshold.

Maybe provide an additional function pca' :: I.Array Int (Vector Double) -> Int -> Matrix Double in Numeric.Statistics.PCA.

The change itself is pretty easy; If you want, I can create a pull request for it.

amcphail commented 11 years ago

Added pcaN to Numeric.Statistics.PCA