Skip to content

Fraction of best ligands - #164

Merged
jthorton merged 8 commits into
mainfrom
feat_fobl
Oct 21, 2025
Merged

Fraction of best ligands#164
jthorton merged 8 commits into
mainfrom
feat_fobl

Conversation

@jthorton

@jthorton jthorton commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Description

Provide a brief description of the PR's purpose here.
This finishes the fraction of best ligands PR started in #122 by @matthewtwarren

Todos

Notable points that this PR has either accomplished or will accomplish.

  • TODO 1

Questions

  • Question1

Checklist

  • Added a news entry for new features, bug fixes, or other user facing changes.

Status

  • Ready to go

Tips

  • Comment "pre-commit.ci autofix" to have pre-commit.ci atomically format your PR.
    Since this will create a commit, it is best to make this comment when you are finished with your work.

fe_map.generate_absolute_values()

# we need to compare the absolute experimental and calculated values so generate them
abs_dataframe = fe_map.get_absolute_dataframe()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We need an easier way of getting the predictions and experimental values out of the FEMap in the correct order.

@codecov

codecov Bot commented Oct 16, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.39%. Comparing base (9d02159) to head (eb7bcab).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #164      +/-   ##
==========================================
+ Coverage   66.78%   69.39%   +2.60%     
==========================================
  Files          17       19       +2     
  Lines        1096     1186      +90     
==========================================
+ Hits          732      823      +91     
+ Misses        364      363       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hannahbaumann hannahbaumann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @jthorton , lgtm, just left two comments!

If `fraction` is not between 0 and 1.
"""

if not (0 <= fraction <= 1):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it checks for this, maybe the fraction argument shouldn't be optional?

Comment thread cinnabar/classification_metrics.py Outdated
num_ligands = histogram.shape[0]
num_best_ligands = math.floor(num_ligands * fraction)

overlap_coefficients = [_compute_overlap_coefficient(histogram, i + 1) for i in range(num_ligands)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I'm probably missing something here, but what is the reason for not putting num_best_ligands instead of num_ligands?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point we can save calculating the overlap for all ligands!

@hannahbaumann hannahbaumann self-assigned this Oct 21, 2025
@jthorton

Copy link
Copy Markdown
Contributor Author

pre-commit.ci autofix

@hannahbaumann hannahbaumann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @jthorton , lgtm!

@jthorton
jthorton merged commit ffe8b52 into main Oct 21, 2025
10 checks passed
@jthorton
jthorton deleted the feat_fobl branch October 21, 2025 10:25
@jthorton jthorton mentioned this pull request Oct 21, 2025
5 tasks
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.

2 participants