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

Correct negative eigenvalues for PCoA on semi-metric distances #302

Open
ChrisKeefe opened this issue Dec 15, 2020 · 0 comments
Open

Correct negative eigenvalues for PCoA on semi-metric distances #302

ChrisKeefe opened this issue Dec 15, 2020 · 0 comments

Comments

@ChrisKeefe
Copy link
Collaborator

ChrisKeefe commented Dec 15, 2020

Addition Description
Semi-metric distances may produce negative eigenvalues, potentially rendering them uninterpretable through PCoA. We should expose one or more methods for correcting these values. Legendre suggests three approaches:

  • take the square roots of the dissimilarities before PCoA
  • Lingoes method: add a constant to the squared dissimilarities:Constant c1 is chosen to make sure that all triangles close
  • Cailliez method: add a constant to the dissimilarities:Constant c2 is chosen to make sure that all triangles close.

Current Behavior
Scikit-bio raises a negative eigenvalue warning to users, encouraging them to interrogate the eigenvalues and decide whether it is useful to proceed.

Proposed Behavior
Expose at least one new transformation which can be applied before PCoA to correct negative eigenvalues. This should probably be its own Method for modularity and ease of use. The scikit-bio warning should probably be augmented to steer users toward correcting their data before calculating PCoA.

References
forum xref
forum implementation discussion
math explained in this skbio issue
Pierre Legendre deck
r-vegan issue - sqrt(D) does not guaranty success

Possible target Actions
diversity pcoa
diversity pcoa-biplot
diversity adonis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant