Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ All notable changes to this project will be documented in this file.
## Unreleased

### Added
- [#1724](https://github.com/pints-team/pints/pull/1724) The `LogLikelihood` class has been reintroduced, to differentiate between probabilities of parameters and probabilities of data, given fixed parameters.
- [#1724](https://github.com/pints-team/pints/pull/1724) Added `PooledLogLikelihood` and `SumOfIndependentLogLikelihoods`.
- [#1716](https://github.com/pints-team/pints/pull/1716) PINTS is now tested on Python 3.14.
- [#1715](https://github.com/pints-team/pints/pull/1715) Added methods `ProblemErrorMeasure.problem()`, `ProblemLogLikelihood.problem()`, `SingleOutputProblem.model()` and `MultiOutputProblem.model()`.
- [#1508](https://github.com/pints-team/pints/pull/1508) Added a method `OptimisationController.set_parameter_tolerance` that allows methods to stop after a fixed number of iterations with no significant movement in parameter space.
### Changed
- [#1724](https://github.com/pints-team/pints/pull/1724) Some methods that accepted `LogPDF`s now specifically require `LogLikelihood`s (e.g. `LogPosterior`, `NestedController`).
- [#1713](https://github.com/pints-team/pints/pull/1713) PINTS now requires matplotlib 2.2 or newer.
### Deprecated
- [#1508](https://github.com/pints-team/pints/pull/1508) The methods `OptimisationController.max_unchanged_iterations` and `set_max_unchanged_iterations` are deprecated, in favour of `function_tolerance` and `set_function_tolerance` respectively.
- [#1724](https://github.com/pints-team/pints/pull/1724) The classes `PooledLogPDF` and `SumOfIndependentLogPDFs` are deprecated, in favour of `PooledLogLikelihood` and `SumOfIndependentLogLikelihoods` respectively.
### Removed
### Fixed
- [#1713](https://github.com/pints-team/pints/pull/1713) Fixed Numpy 2.4.1 compatibility issues.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ Sampling
- :class:`No U-Turn Sampler with dual averaging (NUTS) <NoUTurnMCMC>`
- :class:`RelativisticMCMC`

#. :class:`Nested sampling<NestedSampler>`, require a :class:`LogPDF` and a
:class:`LogPrior` that can be sampled from.
#. :class:`Nested sampling<NestedSampler>`, require a :class:`LogLikelihood`
and a :class:`LogPrior` that can be sampled from.

- :class:`NestedEllipsoidSampler`
- :class:`NestedRejectionSampler`
Expand Down
21 changes: 16 additions & 5 deletions docs/source/log_likelihoods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ Log-likelihoods

.. currentmodule:: pints

The classes below all implement the :class:`ProblemLogLikelihood` interface,
and can calculate a log-likelihood based on some time-series :class:`Problem`
and an assumed noise model.
The classes below all implement the :class:`LogLikelihood` interface.
Most are :class:`ProblemLogLikelihood` implementations, which calculate a
log-likelihood based on some time-series :class:`Problem` and an assumed noise
model.
Some are methods combining other likelihoods.

Example::

logpdf = pints.GaussianLogLikelihood(problem)
log_likelihood = pints.GaussianLogLikelihood(problem)
x = [1, 2, 3]
fx = logpdf(x)
fx = log_likelihood(x)


.. autoclass:: AR1LogLikelihood
Expand All @@ -39,8 +41,17 @@ Example::

.. autoclass:: MultiplicativeGaussianLogLikelihood

.. autoclass:: PooledLogLikelihood

.. autoclass:: PooledLogPDF

.. autoclass:: ScaledLogLikelihood

.. autoclass:: StudentTLogLikelihood

.. autoclass:: SumOfIndependentLogLikelihoods

.. autoclass:: SumOfIndependentLogPDFs

.. autoclass:: UnknownNoiseLogLikelihood

6 changes: 2 additions & 4 deletions docs/source/log_pdfs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ Example::

.. autoclass:: LogPrior

.. autoclass:: LogPosterior

.. autoclass:: PooledLogPDF
.. autoclass:: LogLikelihood

.. autoclass:: ProblemLogLikelihood

.. autoclass:: SumOfIndependentLogPDFs
.. autoclass:: LogPosterior

736 changes: 353 additions & 383 deletions examples/miscellaneous/model-rt-estimation-renewal-equation.ipynb

Large diffs are not rendered by default.

61 changes: 22 additions & 39 deletions examples/toy/distribution-rosenbrock.ipynb

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions pints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,11 @@ def version(formatted=False):
# Logs of probability density functions (not necessarily normalised)
#
from ._log_pdfs import (
LogLikelihood,
LogPDF,
LogPrior,
LogPosterior,
PooledLogPDF,
ProblemLogLikelihood,
SumOfIndependentLogPDFs,
)

#
Expand Down Expand Up @@ -124,8 +123,12 @@ def version(formatted=False):
KnownNoiseLogLikelihood,
LogNormalLogLikelihood,
MultiplicativeGaussianLogLikelihood,
PooledLogLikelihood,
PooledLogPDF,
ScaledLogLikelihood,
StudentTLogLikelihood,
SumOfIndependentLogLikelihoods,
SumOfIndependentLogPDFs,
UnknownNoiseLogLikelihood,
)

Expand Down
2 changes: 1 addition & 1 deletion pints/_boundaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def upper(self):
class LogPDFBoundaries(Boundaries):
"""
Uses a :class:`pints.LogPDF` (e.g. a :class:`LogPrior`) as boundaries),
accepting log-likelihoods above a given threshold as within bounds.
accepting log-pdfs above a given threshold as within bounds.

For a :class:`pints.LogPrior` based on :class:`pints.Boundaries`, see
:class:`pints.UniformLogPrior`.
Expand Down
Loading