Skip to content

Commit c7ea751

Browse files
authored
Merge pull request #1417 from pints-team/i-1067-generic-stochastic-model
Generic stochastic model
2 parents edbf7c1 + 27453ef commit c7ea751

21 files changed

+822
-269
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
55
## Unreleased
66

77
### Added
8+
- [#1417](https://github.com/pints-team/pints/pull/1417) Added a module `toy.stochastic` for stochastic models. In particular, `toy.stochastic.MarkovJumpModel` implements Gillespie's algorithm for easier future implementation of stochastic models.
89
- [#1420](https://github.com/pints-team/pints/pull/1420) The `Optimiser` class now distinguishes between a best-visited point (`x_best`, with score `f_best`) and a best-guessed point (`x_guessed`, with approximate score `f_guessed`). For most optimisers, the two values are equivalent. The `OptimisationController` still tracks `x_best` and `f_best` by default, but this can be modified using the methods `set_f_guessed_tracking` and `f_guessed_tracking`.
910

1011
### Changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2017-2021, University of Oxford (University of Oxford means the
3+
Copyright (c) 2017-2022, University of Oxford (University of Oxford means the
44
Chancellor, Masters and Scholars of the University of Oxford, having an
55
administrative office at Wellington Square, Oxford OX1 2JD, UK).
66
All rights reserved.

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Contents
3939
optimisers/index
4040
noise_model_diagnostics
4141
toy/index
42+
toy/stochastic/index
4243
transformations
4344
utilities
4445

docs/source/toy/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,5 @@ Some toy classes provide extra functionality defined in the
3737
simple_egg_box_logpdf
3838
simple_harmonic_oscillator_model
3939
sir_model
40-
stochastic_degradation_model
4140
stochastic_logistic_model
4241
twisted_gaussian_logpdf
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
***********************
2+
Stochastic Toy Problems
3+
***********************
4+
5+
The `stochastic` module provides toy :class:`models<pints.toy.stochastic.MarkovJumpModel>`,
6+
:class:`distributions<pints.LogPrior>` and
7+
:class:`error measures<pints.ErrorMeasure>` that can be used for tests and in
8+
examples.
9+
10+
11+
.. toctree::
12+
13+
markov_jump_model
14+
stochastic_degradation_model
15+
stochastic_michaelis_menten_model
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*****************
2+
Markov Jump Model
3+
*****************
4+
5+
.. currentmodule:: pints.toy.stochastic
6+
7+
.. autoclass:: MarkovJumpModel

docs/source/toy/stochastic_degradation_model.rst renamed to docs/source/toy/stochastic/stochastic_degradation_model.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
Stochastic degradation model
33
****************************
44

5-
.. currentmodule:: pints.toy
5+
.. currentmodule:: pints.toy.stochastic
66

7-
.. autoclass:: StochasticDegradationModel
7+
.. autoclass:: DegradationModel
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*********************************
2+
Stochastic Michaelis Menten model
3+
*********************************
4+
5+
.. currentmodule:: pints.toy.stochastic
6+
7+
.. autoclass:: MichaelisMentenModel

examples/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ relevant code.
103103

104104
## Toy problems
105105

106-
### Models
106+
### Deterministic Models
107107
- [Beeler-Reuter action potential model](./toy/model-beeler-reuter-ap.ipynb)
108108
- [Constant model](./toy/model-constant.ipynb)
109109
- [Fitzhugh-Nagumo model](./toy/model-fitzhugh-nagumo.ipynb)
@@ -115,8 +115,11 @@ relevant code.
115115
- [Repressilator model](./toy/model-repressilator.ipynb)
116116
- [Simple Harmonic Oscillator model](./toy/model-simple-harmonic-oscillator.ipynb)
117117
- [SIR Epidemiology model](./toy/model-sir.ipynb)
118+
119+
### Stochastic Models
118120
- [Stochastic Degradation model](./toy/model-stochastic-degradation.ipynb)
119121
- [Stochastic Logistic model](./toy/model-stochastic-logistic-growth.ipynb)
122+
- [Stochastic Michaelis Menten model](./toy/model-stochastic-michaelis-menten.ipynb)
120123

121124
### Distributions
122125
- [Annulus](./toy/distribution-annulus.ipynb)

examples/toy/model-stochastic-degradation.ipynb

Lines changed: 16 additions & 22 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)