Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PCA class #221

Closed
paulk-asert opened this issue Jan 3, 2023 · 3 comments
Closed

Add PCA class #221

paulk-asert opened this issue Jan 3, 2023 · 3 comments

Comments

@paulk-asert
Copy link
Contributor

As per discussion on the forum:
https://forum.orekit.org/t/potential-principal-component-analysis-component/2175

paulk-asert added a commit to paulk-asert/hipparchus that referenced this issue Jan 3, 2023
@maisonobe
Copy link
Contributor

Thanks for the contribution!

@axkr
Copy link
Contributor

axkr commented Jan 4, 2023

Can we have a more general PCA implementation like in Mathematica, which also allows a Method->"Correlation" option, additional to the default Method->"Covariance"?

@paulk-asert
Copy link
Contributor Author

This is already supported. You need the constructor with additional options for scaling (correlation):
https://github.com/Hipparchus-Math/hipparchus/blob/master/hipparchus-stat/src/main/java/org/hipparchus/stat/projection/PCA.java#L76-L83

Using new PCA(2) gives the equivalent* output in the Mathematica basic example.

Using new PCA(3, true, true) gives the equivalent* output as the example shown under "Options".

* The absolute values are the same but the sign differs.

axkr added a commit to axkr/symja_android_library that referenced this issue Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants