solution
Interact with estimated solutions (on dense grids).
For example, this module contains functionality to compute off-grid marginals, or to evaluate marginal likelihoods of observations of the solutions.
calibrate(x, /, output_scale)
¤
Calibrated a posterior distribution of an IVP solution.
Source code in probdiffeq/solvers/solution.py
174 175 176 177 178 179 180 |
|
log_marginal_likelihood(u, /, *, standard_deviation, posterior)
¤
Compute the log-marginal-likelihood of observations of the IVP solution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
standard_deviation |
Standard deviation of the observation. Expected to be have shape (n,). |
required | |
u |
Observation. Expected to have shape (n, d) for an ODE with shape (d,). |
required | |
posterior |
Posterior distribution. Expected to correspond to a solution of an ODE with shape (d,). |
required |
Note
Use log_marginal_likelihood_terminal_values
to compute the log-likelihood at the terminal values.
Source code in probdiffeq/solvers/solution.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
log_marginal_likelihood_terminal_values(u, /, *, standard_deviation, posterior)
¤
Compute the log-marginal-likelihood at the terminal value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
u |
Observation. Expected to have shape (d,) for an ODE with shape (d,). |
required | |
standard_deviation |
Standard deviation of the observation. Expected to be a scalar. |
required | |
posterior |
Posterior distribution. Expected to correspond to a solution of an ODE with shape (d,). |
required |
Source code in probdiffeq/solvers/solution.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
offgrid_marginals_searchsorted(*, ts, solution, solver)
¤
Compute off-grid marginals on a dense grid via jax.numpy.searchsorted.
Warning
The elements in ts and the elements in the solution grid must be disjoint. Otherwise, anything can happen and the solution will be incorrect. At the moment, we do not check this.
Warning
The elements in ts must be strictly in (t0, t1). They must not lie outside the interval, and they must not coincide with the interval boundaries. At the moment, we do not check this.
Source code in probdiffeq/solvers/solution.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|