Skip to content

Fix DR baselines - #816

Merged
scottgigante-immunai merged 8 commits into
openproblems-bio:mainfrom
scottgigante-immunai:bugfix/dr_baselines
Feb 8, 2023
Merged

Fix DR baselines#816
scottgigante-immunai merged 8 commits into
openproblems-bio:mainfrom
scottgigante-immunai:bugfix/dr_baselines

Conversation

@scottgigante-immunai

Copy link
Copy Markdown
Collaborator

This PR fixes various problems with the dimensionality reduction baselines.

  • density_preservation was giving a correlation of 0.5 when comparing the true data to itself
  • spectral distances should be optimized by spectral embeddings
  • spectral distances should weight the eigenvectors by their eigenvalues
  • Removed some unnecessary baselines
  • Added a diffusion maps method (incidental, through spectral distance fix) and a zebrafish dataset (as all existing datasets were rather simple)

@github-actions

github-actions Bot commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

Current build status

@scottgigante-immunai

Copy link
Copy Markdown
Collaborator Author

Closes #803

@lazappi lazappi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code looks good to me. Do you mind quickly explaining the motivation for the spectral distances? I'm just not very familiar with diffusion maps and would be good to have some background in case it comes up later.

@codecov

codecov Bot commented Feb 7, 2023

Copy link
Copy Markdown

Codecov Report

Base: 95.61% // Head: 95.68% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (366bda8) compared to base (2da81a9).
Patch coverage: 98.11% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #816      +/-   ##
==========================================
+ Coverage   95.61%   95.68%   +0.07%     
==========================================
  Files         184      186       +2     
  Lines        4949     4984      +35     
  Branches      273      271       -2     
==========================================
+ Hits         4732     4769      +37     
  Misses        138      138              
+ Partials       79       77       -2     
Flag Coverage Δ
unittests 95.68% <98.11%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tasks/dimensionality_reduction/methods/baseline.py 89.65% <85.71%> (-2.46%) ⬇️
...sks/dimensionality_reduction/datasets/zebrafish.py 100.00% <100.00%> (ø)
.../dimensionality_reduction/methods/diffusion_map.py 100.00% <100.00%> (ø)
.../tasks/dimensionality_reduction/metrics/density.py 100.00% <100.00%> (+4.65%) ⬆️
...ionality_reduction/metrics/distance_correlation.py 100.00% <100.00%> (ø)
test/test_task_dimensionality_reduction.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@scottgigante-immunai

Copy link
Copy Markdown
Collaborator Author

Sure! Tl;dr diffusion distances are graph distances that are robust to noise. Where a graph shortest path distance is sensitive to a single noisy point short-circuiting the path between two otherwise distant points on the manifold, diffusion distances use the probability of traversing the graph from one point to another via a random walk to integrate over all graph paths instead of simply the shortest one.

@mvinyard mvinyard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great, thank you @scottgigante-immunai !

@scottgigante-immunai
scottgigante-immunai merged commit 80b37e7 into openproblems-bio:main Feb 8, 2023
@scottgigante-immunai
scottgigante-immunai deleted the bugfix/dr_baselines branch February 8, 2023 15:38
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