Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,718 changes: 1,718 additions & 0 deletions docs/examples/dataworth.ipynb

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion docs/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ Below you can find examples for the different plugins.

randomized_maximum_likelihood

.. toctree::
:maxdepth: 4
:hidden:
:caption: Data Worth

randomized_maximum_likelihood
Comment thread
martinvonk marked this conversation as resolved.
Outdated


Response functions
------------------
Expand Down Expand Up @@ -87,4 +94,10 @@ PEST Solver
Randomized Maximum Likelihood
-----------------------------

:doc:`Randomized Maximum Likelihood parameter estimation <randomized_maximum_likelihood>`
:doc:`Randomized Maximum Likelihood parameter estimation <randomized_maximum_likelihood>`


Data Worth
----------

:doc:`Data Worth <dataworth>`
46 changes: 46 additions & 0 deletions docs/plugins/dataworth.rst
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:
7 changes: 7 additions & 0 deletions pastas_plugins/dataworth/__init__.py
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__
Loading
Loading