-
Notifications
You must be signed in to change notification settings - Fork 1
Add dataworth plugin #43
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
Open
dbrakenhoff
wants to merge
10
commits into
dev
Choose a base branch
from
dataworth
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
17713cb
Add dataworth plugin
dbrakenhoff ec05085
ignore vary=False parameters when building column names
dbrakenhoff 196e511
be consistent
dbrakenhoff bfb456f
add some textual clarifications
martinvonk 94db42e
add __version__ to __init__
martinvonk 284f118
only recompute jacobian on parameters that vary
martinvonk 19c8356
add type hints
martinvonk 567b07f
data worth example that does not work so well
martinvonk ca33422
resolve some of my own comments
martinvonk 088133a
add todo for jac method
martinvonk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| .. _DataWorth: | ||
|
|
||
| Data Worth | ||
| ---------- | ||
|
|
||
| .. role:: python(code) | ||
| :language: python | ||
|
|
||
| The :code:`dataworth` plugin contains a class and and visualizations to analyze the | ||
| data worth of observations in a pastas model. | ||
|
|
||
| Currently the following class is available: | ||
|
|
||
| - :class:`~pastas_plugins.dataworth.DataWorth`: Create a DataWorth class to run data worth analysis | ||
|
|
||
| This class exposes the following methods to analyze data worth: | ||
|
|
||
| - :meth:`~pastas_plugins.dataworth.DataWorth.data_worth_per_observation`: Compute data worth per observation with leave-one-out analysis. | ||
| - :meth:`~pastas_plugins.dataworth.DataWorth.data_worth_thinning`: Compute data worth for groups of observations by specifying thinning factors. | ||
| - :meth:`~pastas_plugins.dataworth.DataWorth.data_worth_per_added_observation`: Compute data worth for each added observation. | ||
| - :meth:`~pastas_plugins.dataworth.DataWorth.data_worth_new_observations`: Compute data worth for groups of added observations. | ||
| - :meth:`~pastas_plugins.dataworth.DataWorth.recompute_jacobian`: Recompute jacobian, needed to include new observations for data worth analysis. | ||
|
|
||
| These methods are the backbone of the above calculations: | ||
|
|
||
| - :meth:`~pastas_plugins.dataworth.DataWorth.observation_noise_covariance`: Compute an observation noise covariance matrix. | ||
| - :meth:`~pastas_plugins.dataworth.DataWorth.fisher_information_matrix`: Compute the Fisher information matrix. | ||
| - :meth:`~pastas_plugins.dataworth.DataWorth.compute_covariance`: Compute parameter covariance matrix, given a jacobian, an observation noise covariance matrix and an optional mask | ||
| - :meth:`~pastas_plugins.dataworth.DataWorth.data_worth`: Compute overall data worth (log determinant of parameter covariance matrix) and per-parameter data worth (variance of parameters). | ||
|
|
||
| The following plots are available: | ||
|
|
||
| - :func:`~pastas_plugins.dataworth.plot_data_worth_series`: Plot the overall data worth and per parameter data worth for each per observation. | ||
| - :func:`~pastas_plugins.dataworth.plot_data_worth_heatmap`: Plot a heatmap of data worth with years on the y-axis and days on the x-axis. | ||
|
|
||
| Example | ||
| ^^^^^^^ | ||
|
|
||
| See the :ref:`Examples` section for more information on how to use the :code:`dataworth` plugin. | ||
|
|
||
| API | ||
| ^^^ | ||
| .. automodule:: pastas_plugins.dataworth | ||
| :members: | ||
| :undoc-members: | ||
| :private-members: |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # ruff: noqa: F401 | ||
| from pastas_plugins.dataworth.dataworth import ( | ||
| DataWorth, | ||
| plot_data_worth_heatmap, | ||
| plot_data_worth_series, | ||
| ) | ||
| from pastas_plugins.dataworth.version import __version__ |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.