-
Notifications
You must be signed in to change notification settings - Fork 24
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
Refactors BaseCost.evaluate/S1
into BaseCost.compute
#455
Refactors BaseCost.evaluate/S1
into BaseCost.compute
#455
Conversation
…uate/S1 into __call__
…mple stoich., tidy GaussLikelihood
…emove redundant return calcs
…lf), GaussianLogLikelihood now separable, updt tests.
…hods-to-accept-precomputed-signals # Conflicts: # CHANGELOG.md
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #455 +/- ##
===========================================
- Coverage 98.71% 98.69% -0.02%
===========================================
Files 47 47
Lines 3025 2985 -40
===========================================
- Hits 2986 2946 -40
Misses 39 39 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
…hods-to-accept-precomputed-signals # Conflicts: # CHANGELOG.md
…hods-to-accept-precomputed-signals # Conflicts: # CHANGELOG.md # tests/integration/test_spm_parameterisations.py
Project coverage fails because this PR removes a large amount of code, but the number of missed line hits remains the same. All good for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to remove the inputs
argument from compute()
to avoid the possibility of users passing parameters which do not match those used to make the prediction. Other than that, only a couple of minor comments and we should be good to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these improvements!
Description
This PR refactors
BaseCost.evaluate/S1
&BaseCost._evaluate/S1
intoBaseCost.__call__
andBaseCost.compute
.BaseCost.compute
directly acts on the predictions, whileBaseCost.__call__
callsBaseProblem.evaluate/S1
beforeBaseCost.compute
. Fully separates__call__
andcompute
for FittingCosts, Likelihoods. This PR also has bugfixes to GaussianLogLikelihood calculation.Issue reference
Fixes #435
Review
Before you mark your PR as ready for review, please ensure that you've considered the following:
Type of change
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ nox -s tests
$ nox -s doctest
You can run integration tests, unit tests, and doctests together at once, using
$ nox -s quick
.Further checks:
Thank you for contributing to our project! Your efforts help us to deliver great software.