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 CBC score #1168

Merged
merged 13 commits into from
Mar 4, 2024
Merged

Add CBC score #1168

merged 13 commits into from
Mar 4, 2024

Conversation

WeilerP
Copy link
Member

@WeilerP WeilerP commented Feb 23, 2024

Description

  • Adds cross-boundary correctness (CBC) score

Closes

Closes #1167.

@WeilerP WeilerP requested a review from michalk8 February 23, 2024 13:54
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 97.50000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 80.76%. Comparing base (f0e09d2) to head (cf61929).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1168      +/-   ##
==========================================
+ Coverage   80.69%   80.76%   +0.07%     
==========================================
  Files          51       51              
  Lines        8566     8606      +40     
  Branches     2234     2237       +3     
==========================================
+ Hits         6912     6951      +39     
  Misses       1102     1102              
- Partials      552      553       +1     
Files Coverage Δ
src/cellrank/kernels/_base_kernel.py 84.17% <97.50%> (+1.22%) ⬆️

Copy link
Collaborator

@michalk8 michalk8 left a comment

Choose a reason for hiding this comment

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

Please also add tests.

src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
@WeilerP
Copy link
Member Author

WeilerP commented Feb 29, 2024

I'll add the tests ASAP, @michalk8. Can you briefly comment on the Pearson correlation part?

src/cellrank/kernels/_base_kernel.py Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
src/cellrank/kernels/_base_kernel.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@michalk8 michalk8 left a comment

Choose a reason for hiding this comment

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

Thanks a lot @WeilerP !

WeilerP added 13 commits March 4, 2024 09:51
Adds function to identify observations at the boundary of two clusters.
Add `KernelExpression` class method to estimate the empirical velocity
field of boundary cells in the source region towards a target cluster.
Adds `KernelExpression` class method to estimate velocity field based on
a single step under the transition matrix.
Add class method for computing cross-boundary correctness score.
* Make function private.
* Rename argument `graph` to `graph_key`.
* Add return type.
* Update docstrings.
* Change definition of `source_ids`.
* Update identification of boundary IDs.
* Make function private.
* Rename argument `graph` to `graph_key`.
* Finish type hints.
* Update docstrings.
* Simplify computation of empirical velocity estimates.
* Make function private.
* Add return type.
* Update docstrings.
* Add return type.
* Rename argument `graph` to `graph_key`.
* Update docstrings.
* Rename and refactor `get_pearson_corr`.
* Rename function to `cbc`.
* Update docstrings.
* Refactor `_pearsonr`.
* Remove redundant code.
* Add TODO comment.
* Refactor definition of `empirical_velo`.
Remove redundant code; `target` is always a
string.
@WeilerP WeilerP merged commit 696a23b into theislab:main Mar 4, 2024
8 of 9 checks passed
@WeilerP WeilerP deleted the feat/cbc branch March 4, 2024 10:07
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.

Cross-boundary correctness score
2 participants