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 fraction best ligands metric #122

Open
wants to merge 1 commit into
base: classification_metric
Choose a base branch
from

Conversation

matthewtwarren
Copy link

Description

Implementation of Chris Bayly's fraction of best ligands ranking/classification metric.

This involves first computing the overlap coefficient - the fraction of N most-active experimental ligands that are in the N most-active predictions. This is implemented via the _compute_overlap_coefficient helper function, which relies on a 2D histogram constructed via the _create_2d_histogram function.

The fraction of best ligands is then calculated by averaging the overlap coefficients from N = 1 up to a given fraction of the ligands. The default is 0.5, i.e. up to num_ligands/2, rounded down. This is implemented in via compute_fraction_best_ligands.

Todos

  • Implement helper functions to generate histogram and compute overlap coefficient
  • Implement main function to compute metric
  • Write tests

Status

  • Testing
  • Ready to go

@pep8speaks
Copy link

Hello @matthewtwarren! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 151:1: W293 blank line contains whitespace
Line 202:83: W291 trailing whitespace
Line 231:1: W293 blank line contains whitespace
Line 234:1: W293 blank line contains whitespace
Line 237:33: W292 no newline at end of file

@RiesBen
Copy link

RiesBen commented Jun 5, 2024

HI @matthewtwarren ,
thanks for pushing this, I will have a look at it soon! :)

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