Skip to content

Add dataworth plugin#43

Open
dbrakenhoff wants to merge 10 commits into
devfrom
dataworth
Open

Add dataworth plugin#43
dbrakenhoff wants to merge 10 commits into
devfrom
dataworth

Conversation

@dbrakenhoff

Copy link
Copy Markdown
Member
  • add DataWorth class as entry point to computations
  • add example notebook with explanation (to the best of my current ability)
  • add docs
  • add dummy test (to be expanded later)
  • add dependencies to pyproject.toml

- add DataWorth class as entry point to computations
- add example notebook with explanation (to the best of my current ability)
- add docs
- add dummy test (to be expanded later)
- add dependencies to pyproject.toml
@dbrakenhoff dbrakenhoff requested a review from martinvonk April 22, 2026 11:53
@dbrakenhoff dbrakenhoff self-assigned this Apr 22, 2026
@dbrakenhoff dbrakenhoff added the enhancement New feature or request label Apr 22, 2026
Comment thread pastas_plugins/dataworth/dataworth.py Outdated
Comment thread docs/examples/index.rst Outdated
Comment thread pastas_plugins/dataworth/dataworth.py
Comment thread pastas_plugins/dataworth/dataworth.py Outdated
Comment thread pastas_plugins/dataworth/dataworth.py
Comment thread pastas_plugins/dataworth/dataworth.py Outdated
Comment thread pastas_plugins/dataworth/dataworth.py
Comment thread tests/test_dataworth.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe nice to let copilot create some tests

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copilot is MIA at the moment ;)

Comment thread pastas_plugins/dataworth/dataworth.py Outdated
var_params_k = np.diag(C_k)
return logdet_k, var_params_k

def data_worth_per_observation(self):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant comment per line in the notebook. But it is maybe nice to have an keyword argument option to compute data_worth_per_observation as a percentage, just as in the notebook... And is the unit then not in percentage point instead of a percentage?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, this would be a nice option to have.

Comment thread pastas_plugins/dataworth/dataworth.py Outdated
class DataWorth:
def __init__(self, ml, J=None, objfun_target="noise"):

self.ml = ml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be better to copy the model?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model is never modified in any meaningful way, so I don't think it matters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants