andreicuceu / vega

GNU General Public License v3.0
9 stars 5 forks source link

Calculate and display parameter sensitivity #119

Closed dkirkby closed 1 year ago

dkirkby commented 1 year ago

This PR calculates partial derivatives of a model with respect to each floating parameter then uses these to calculate the Fisher information distributed over bins in (rt,rp) to show which regions of the data space are most sensitive to each parameter.

This is a draft PR with the initial commits implementing a new method VegaInterface.compute_sensitivity(). I will add the code I use to plot partial derivatives and Fisher information next.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 2.75% and project coverage change: -1.69% :warning:

Comparison is base (cec4ec4) 48.68% compared to head (544a725) 47.00%. Report is 6 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #119 +/- ## ========================================== - Coverage 48.68% 47.00% -1.69% ========================================== Files 25 25 Lines 2974 3085 +111 Branches 562 587 +25 ========================================== + Hits 1448 1450 +2 - Misses 1403 1512 +109 Partials 123 123 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `47.00% <2.75%> (-1.69%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrei+Cuceu#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/andreicuceu/vega/pull/119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrei+Cuceu) | Coverage Δ | | |---|---|---| | [vega/vega\_interface.py](https://app.codecov.io/gh/andreicuceu/vega/pull/119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrei+Cuceu#diff-dmVnYS92ZWdhX2ludGVyZmFjZS5weQ==) | `53.35% <2.00%> (-8.77%)` | :arrow_down: | | [vega/plots/plot.py](https://app.codecov.io/gh/andreicuceu/vega/pull/119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrei+Cuceu#diff-dmVnYS9wbG90cy9wbG90LnB5) | `18.14% <3.38%> (-4.50%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/andreicuceu/vega/pull/119/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andrei+Cuceu)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

andreicuceu commented 1 year ago

Hi @dkirkby, this looks great. I'm happy to merge if you've pushed everything you wanted.

dkirkby commented 1 year ago

Hi @andreicuceu - I think this is ready now for your review and merge. The new Sensitivity_tutorial notebook is probably the best starting point for an overview of the features I added.

dkirkby commented 1 year ago

Hi Andrei - just checking back on this PR. Are there any changes I should make?