Skip to content

Fix sign of residuals#2896

Merged
dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl:fix_res
Jul 17, 2025
Merged

Fix sign of residuals#2896
dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl:fix_res

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Jul 14, 2025

Residuals (ReturnData::res) were previously computed as y - my, but should be my - y.

  • Fix computing res/sres
  • Update expected results for Python-generated models (Matlab-model results are still sign-flipped).

@codecov
Copy link

codecov bot commented Jul 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.60%. Comparing base (a71c990) to head (0fba9e1).
⚠️ Report is 56 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2896      +/-   ##
==========================================
+ Coverage   79.55%   79.60%   +0.04%     
==========================================
  Files         358      358              
  Lines       23033    23033              
  Branches     1581     1581              
==========================================
+ Hits        18325    18335      +10     
+ Misses       4697     4687      -10     
  Partials       11       11              
Flag Coverage Δ
cpp 74.95% <37.50%> (+0.04%) ⬆️
cpp_python 33.18% <25.00%> (ø)
petab 38.98% <87.50%> (ø)
python 73.82% <37.50%> (+0.04%) ⬆️
sbmlsuite-jax 34.56% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
python/sdist/amici/jax/model.py 86.54% <100.00%> (ø)
src/rdata.cpp 93.03% <100.00%> (ø)

... and 4 files with indirect coverage changes

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

@dweindl dweindl self-assigned this Jul 14, 2025
@dweindl dweindl force-pushed the fix_res branch 2 times, most recently from fc1aabd to 7ea219a Compare July 17, 2025 07:23
Residuals (`ReturnData::res`) were previously computed as `y - my`, but should be `my - y`.

* Fix computing `res`/`sres`
* Update expected results for Python-generated models (Matlab-model results are still sign-flipped).
@dweindl dweindl marked this pull request as ready for review July 17, 2025 09:24
@dweindl dweindl requested a review from a team as a code owner July 17, 2025 09:25
@dweindl dweindl merged commit 167864b into AMICI-dev:main Jul 17, 2025
22 checks passed
@dweindl dweindl deleted the fix_res branch July 17, 2025 19:05
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