Skip to content

Add fraction best ligands metric - #122

Closed
matthewtwarren wants to merge 1 commit into
OpenFreeEnergy:classification_metricfrom
matthewtwarren:classification_metric
Closed

Add fraction best ligands metric#122
matthewtwarren wants to merge 1 commit into
OpenFreeEnergy:classification_metricfrom
matthewtwarren:classification_metric

Conversation

@matthewtwarren

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

RiesBen commented Jun 5, 2024

Copy link
Copy Markdown

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

@jthorton

Copy link
Copy Markdown
Contributor

Thanks for the great work on this @matthewtwarren this is now completed in #164 in which we list you as an author!

@jthorton jthorton closed this Oct 21, 2025
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.

5 participants