Skip to content

Conversation

@MattScicluna
Copy link
Contributor

Added graceful error handling for degenerate distance matrices in PHATE's MDS embedding step. When KNN is close to dataset size, diffusion homogeneity causes all-zero distance matrices. Instead of crashing with Procrustes error, now returns zero embedding with RuntimeWarning explaining the hyperparameter issue.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 19182400153

Details

  • 2 of 5 (40.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 86.955%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Python/phate/mds.py 2 5 40.0%
Totals Coverage Status
Change from base Build 18855971798: -0.01%
Covered Lines: 2333
Relevant Lines: 2683

💛 - Coveralls

Removed debug print statement from MDS function.
@coveralls
Copy link

coveralls commented Nov 14, 2025

Pull Request Test Coverage Report for Build 19371928356

Details

  • 1 of 4 (25.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.09%) to 86.875%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Python/phate/mds.py 1 4 25.0%
Totals Coverage Status
Change from base Build 18855971798: -0.09%
Covered Lines: 2330
Relevant Lines: 2682

💛 - Coveralls

Copy link
Contributor

@bjoaofelipe bjoaofelipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@MattScicluna MattScicluna merged commit b1694b9 into KrishnaswamyLab:main Nov 14, 2025
5 of 6 checks passed
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

Successfully merging this pull request may close these issues.

3 participants