Hook post-hoc binary metrics and plots into standard evaluation framework#492
Open
Hook post-hoc binary metrics and plots into standard evaluation framework#492
Conversation
Added an index filtering step to FeatureConcatenator. Previously, if different featurizers dropped different molecules, the raw arrays were still concatenated, resulting in shape mismatches or mismatched rows. The features are now strictly masked to the common indices prior to concatenation.
This overhaul replaces slow, high-dependency integration tests with true unit tests utilizing pytest-mock and synthetic data fixtures. Key changes include swapping tautological file-writing mocks for internal state assertions, enforcing strict disjoint set validation for chemical splitters, and implementing rigorous mathematical validation for uncertainty quantification and evaluation metrics. These updates significantly improve execution speed and cross-platform stability by replacing fragile floating-point equality with robust approximate comparisons and isolating testing boundaries for featurizers, inference orchestration, and CLI logic.
for more information, see https://pre-commit.ci
Updated PosthocBinaryMetrics and created PosthocBinaryPlots to conform to the standard evaluate API, returning nested metric dictionaries and matplotlib objects. Registered both classes and added strict unit tests to verify mathematical accuracy and figure generation.
for more information, see https://pre-commit.ci
Contributor
Author
|
FYI we just did this to demo copilot functionality. Probably still worth merging for posterity, but generally we're less interested in binary classification workflows. |
Codecov Report❌ Patch coverage is 🚀 New features to boost your workflow:
|
Contributor
Author
|
Will resolve #143 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR integrates post-hoc binary classification into the standard
openadmetevaluation and orchestration framework. By mirroring the established regression pattern,PosthocBinaryMetricsand the newly createdPosthocBinaryPlotscan now be dynamically instantiated and called by the pipeline.Key Changes
PosthocBinaryMetrics.evaluateto accepty_true,y_pred, andcutoff. It now returns the standard nested dictionary format expected by the workflow ({"task_0": {"precision": {"value": ...}}}).PosthocBinaryPlotsto generate post-hoc classification scatter plots and confusion matrices. It returns a dictionary ofmatplotlib.figure.Figureobjects.@evaluators.registerdecorator.test_posthoc_binary_metrics_evaluateandtest_posthoc_binary_plots_evaluatetotest_eval.py. These tests strictly verify mathematical outputs and object instantiation, adhering to the project's rule against tautological or lazy (assert True) testing.Status
Developers certificate of origin