-
Notifications
You must be signed in to change notification settings - Fork 31
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 support for observable-dependent sigmas #1692
Conversation
Standard deviations may now depend on observables. Closes #609
3b30e10
to
41ff9b9
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1692 +/- ##
===========================================
+ Coverage 78.38% 78.45% +0.07%
===========================================
Files 70 70
Lines 11371 11414 +43
===========================================
+ Hits 8913 8955 +42
- Misses 2458 2459 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Nice! Should be possible to add Raia model (https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab/tree/model_Raia_CancerResearch2011) to bmc tests now, right?
src/model.cpp
Outdated
auto ret = SUNMatScaleAdd(1.0, derived_state_.dJydy_.at(iyt).get(), | ||
tmp_sparse); | ||
if(ret != SUNMAT_SUCCESS) { | ||
SUNMatDestroy(tmp_sparse); |
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.
move SUNMatDestroy(tmp_sparse);
before if clause?
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.
Absolutely.
@@ -142,7 +142,6 @@ void ReturnData::initializeFullReporting(bool quadratic_llh) { | |||
srz.resize(nmaxevent * nz * nplist, 0.0); | |||
} | |||
|
|||
ssigmay.resize(nt * ny * nplist, 0.0); |
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.
don't delete but only initialize if sensi_meth == SensitivityMethod::forward
?
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.
That's already taken care of by ReturnData::initializeResidualReporting
which is called a few lines above.
Lines 75 to 86 in 353e7f9
void ReturnData::initializeResidualReporting(bool enable_res) { | |
y.resize(nt * ny, 0.0); | |
sigmay.resize(nt * ny, 0.0); | |
if (enable_res) | |
res.resize((sigma_res ? 2 : 1) * nt * nytrue, 0.0); | |
if ((sensi_meth == SensitivityMethod::forward && | |
sensi >= SensitivityOrder::first) | |
|| sensi >= SensitivityOrder::second) { | |
sy.resize(nt * ny * nplist, 0.0); | |
ssigmay.resize(nt * ny * nplist, 0.0); |
Thanks for your help.
AMICI/tests/benchmark-models/benchmark_models.yaml Lines 58 to 59 in 067826d
|
…led.xml history in ./python/examples/example_steadystate/model_steadystate_scaled_without_observables.xml history.
SonarCloud Quality Gate failed. |
Standard deviations may now depend on observables.
Side-effects:
ssigmay
will not be available anymore with adjoint sensitivity analysis.Closes #609