pints icon indicating copy to clipboard operation
pints copied to clipboard

Probabilistic Inference on Noisy Time Series

Results 200 pints issues
Sort by recently updated
recently updated
newest added

Create a PR template for introduction of new sampling methods into PINTS

[{"_id":"63806a33bc25e83db00a4b03","body":"Good description of how to do so here: https:\/\/blog.axosoft.com\/enhancing-pull-request-descriptions-templates\/","issue_id":1660245932364,"origin_id":771624488,"user_origin_id":4490664,"create_time":1612271512,"update_time":1612271512,"id":1669360179511,"updated_at":"2022-11-25T07:09:39.511000Z","created_at":"2022-11-25T07:09:39.511000Z"},{"_id":"63806a33bc25e83db00a4b04","body":"As part of this, I'm thinking that people need to specify hyperparameters for their method (in a file on PINTS somewhere) that are hand-picked for each of the problems we use for functional testing. I think we probably already have something like this for existing methods on the original functional testing repo...\r\n\r\nIt might also be worth having a \"score sheet\" for a method presented before it's merged: showing its performance on the functional tests. Whether we'd want such a score sheet in PINTS: I doubt it. But, we could have a separate repo with scores for each method.","issue_id":1660245932364,"origin_id":771723555,"user_origin_id":4490664,"create_time":1612280339,"update_time":1612280339,"id":1669360179514,"updated_at":"2022-11-25T07:09:39.514000Z","created_at":"2022-11-25T07:09:39.514000Z"},{"_id":"63806a33bc25e83db00a4b05","body":"We're thinking it should have:\r\n\r\n- optimal hyperparameters for each functional test\r\n- average (I think mean) score across each of the functional tests","issue_id":1660245932364,"origin_id":775812771,"user_origin_id":4490664,"create_time":1612864586,"update_time":1612864586,"id":1669360179516,"updated_at":"2022-11-25T07:09:39.516000Z","created_at":"2022-11-25T07:09:39.516000Z"}] comment

testing

I think it'd be nice if: ``` x0 = [3, 4] sampler = pints.HamiltonianMCMC(x0) print(sampler) ``` returned: > "Hamiltonian Monte Carlo sampler initialised at [3, 4]" If `x0` was long,...

Make __call__ check for valid parameter length in various classes

[{"_id":"638068ff70db72139b10fe3c","body":"Sounds good!","issue_id":1660245932367,"origin_id":778088066,"user_origin_id":517644,"create_time":1613122863,"update_time":1613122863,"id":1669359871375,"updated_at":"2022-11-25T07:04:31.375000Z","created_at":"2022-11-25T07:04:31.375000Z"}] comment

I just got stumped by the following: a = pints.toy.RosenbrockError() a.n_parameters() -> 2 (ok) a([1, 3]) -> 400 (ok) So far so good. Now: a([1, 3, 4]) -> 400 a([1,...

Make sure MultimodalNormalLogPDF throws an error when supplying non-posdefinite cov matrix

[{"_id":"6380748c4b97542c9a3071be","body":"If it does that'll be from the underlying scipy \/ numpy code then (so not something we need to test)","issue_id":1660245932370,"origin_id":421337757,"user_origin_id":517644,"create_time":1536926664,"update_time":1536926664,"id":1669362828492,"updated_at":"2022-11-25T07:53:48.491000Z","created_at":"2022-11-25T07:53:48.491000Z"},{"_id":"6380748c4b97542c9a3071bf","body":"I don't understand why the below returns a non-zero number:\r\n\r\n```\r\ndist = scipy.stats.multivariate_normal(mean=[16, 12], cov=[[0.8, 0.2], [0.1, 1.4]])\r\ndist.pdf([3, 4])\r\n```\r\n\r\nhere `cov` is not symmetric, so does not satisfy, \"The covariance matrix cov must be a (symmetric) positive semi-definite matrix\" in the scipy docs...\r\n\r\nThis looks like a bug in scipy to me! So, we need to test.","issue_id":1660245932370,"origin_id":776371197,"user_origin_id":4490664,"create_time":1612921529,"update_time":1612921529,"id":1669362828495,"updated_at":"2022-11-25T07:53:48.495000Z","created_at":"2022-11-25T07:53:48.495000Z"},{"_id":"6380748c4b97542c9a3071c0","body":"Wrote a bug issue on Scipy: https:\/\/github.com\/scipy\/scipy\/issues\/13541","issue_id":1660245932370,"origin_id":776374622,"user_origin_id":4490664,"create_time":1612922094,"update_time":1612922094,"id":1669362828498,"updated_at":"2022-11-25T07:53:48.497000Z","created_at":"2022-11-25T07:53:48.497000Z"},{"_id":"6380748c4b97542c9a3071c1","body":"I'm happy for us to stick in a test that the matrix must be symmetric, although we'll run into the precision issues mentioned by the scipy devs.","issue_id":1660245932370,"origin_id":776536220,"user_origin_id":517644,"create_time":1612946007,"update_time":1612946007,"id":1669362828500,"updated_at":"2022-11-25T07:53:48.500000Z","created_at":"2022-11-25T07:53:48.500000Z"},{"_id":"6380748c4b97542c9a3071c2","body":"It's fine for us not to test it in that case (I do think the scipy\nreasoning is a bit weak though: if you're afraid of numerical round off,\nfine, but most other libraries manage to find a sensible middle ground).\nAlthough we need to make sure that we use the method properly, so need to\nfix the populationMC notebook (and more generally check\nwherever MultiModalLogPDF is called). I'll create a separate ticket for\nthis though and close this one.\n\nOn Wed, Feb 10, 2021 at 8:33 AM Michael Clerx <[email protected]>\nwrote:\n\n> I'm happy for us to stick in a test that the matrix must be symmetric,\n> although we'll run into the precision issues mentioned by the scipy devs.\n>\n> \u2014\n> You are receiving this because you were assigned.\n> Reply to this email directly, view it on GitHub\n> <https:\/\/github.com\/pints-team\/pints\/issues\/498#issuecomment-776536220>,\n> or unsubscribe\n> <https:\/\/github.com\/notifications\/unsubscribe-auth\/ABCILKBY3KWPPUPZZ22H22TS6JAGLANCNFSM4FTAODEQ>\n> .\n>\n","issue_id":1660245932370,"origin_id":776561183,"user_origin_id":4490664,"create_time":1612948510,"update_time":1612948510,"id":1669362828502,"updated_at":"2022-11-25T07:53:48.502000Z","created_at":"2022-11-25T07:53:48.502000Z"},{"_id":"6380748c4b97542c9a3071c3","body":"Actually, I'm now less sure: we _do_ have such a test in the GaussianLogPDF, so I'm just going to grab this from there.","issue_id":1660245932370,"origin_id":776567487,"user_origin_id":4490664,"create_time":1612949064,"update_time":1612949064,"id":1669362828505,"updated_at":"2022-11-25T07:53:48.504000Z","created_at":"2022-11-25T07:53:48.504000Z"}] comment

The populationMCMC notebook has this, I think.

testing
easy win

Add brute-force samplers (for uniform priors)

[{"_id":"638078c770db72139b110e8f","body":"Michael wrote:\r\n\r\n\"_Thinking about doing some brute-force parameter space exploration around points returned by optimisers. Need to do it in 2D\/3D so I can visualise though. Would it be enough to plot parameter 1 & parameter 2, parameter 3 & parameter 4 etc. Or should I do plots for all possible combinations (like the triangular MCMC plots?)\r\n_\"\r\n\r\nJonathan wrote:\r\n\r\n\"_Depends what you want to use it for I guess. Doing all combinations will give you a better feel for what's going on, and just involves more plots, not more computation.\r\nYou could perhaps figure out which pairs give the most interesting surface (biggest changes in likelihood) and plot those first?_\"\r\n\r\n@martinjrobins wrote:\r\n\r\n\"_@michael r u implementing this in pints? I'd like to do this as well, so it would be nice to have this as a general plot_likelihood_around_point() type function_\"","issue_id":1660245932372,"origin_id":317352317,"user_origin_id":517644,"create_time":1500884473,"update_time":1500884473,"id":1669363911383,"updated_at":"2022-11-25T08:11:51.383000Z","created_at":"2022-11-25T08:11:51.383000Z"},{"_id":"638078c770db72139b110e90","body":"Thinking it could be good to have this in a box (i.e. boundaries \/ uniform prior) and then uniformly spaced. If we make it more complicated it stops being a check and becomes a bad version of mcmc or other samplers","issue_id":1660245932372,"origin_id":368834257,"user_origin_id":517644,"create_time":1519729324,"update_time":1519729324,"id":1669363911386,"updated_at":"2022-11-25T08:11:51.386000Z","created_at":"2022-11-25T08:11:51.386000Z"},{"_id":"638078c770db72139b110e91","body":"Turns out I have this in Myokit (but have deprecated it because fitting isn't a core goal there)\r\n\r\n```\r\ndef map_grid(f, bounds, n, parallel=False, args=None):\r\n \"\"\"\r\n Maps a parameter space by evaluating every point in a rectangular grid.\r\n Arguments:\r\n ``f``\r\n A function to map. The function ``f(x)`` must be callable with ``x`` a\r\n sequence of ``m`` coordinates and should return a single scalar value.\r\n ``bounds``\r\n A list of ``m`` tuples ``(min_i, max_i)`` specifying the minimum and\r\n maximum values in the search space for each dimension ``i``. The mapped\r\n space will be within these bounds.\r\n ``n``\r\n The number of points to sample in each direction. If ``n`` is a scalar\r\n the function will map a grid of ``n`` points in each direction, so that\r\n the total number of points is ``n**m``, where ``m`` is the\r\n dimensionality of the search space. Alternatively, the number of points\r\n in each dimension can be specified by passing in a length ``m``\r\n sequence of sizes, so that the total number of points mapped is\r\n ``n[0] * n[1] * ... * n[m-1]``.\r\n ``parallel``\r\n Set to ``True`` to run evaluations on all available cores.\r\n ``args``\r\n An optional tuple containing extra arguments to ``f``. If ``args`` is\r\n specified, ``f`` will be called as ``f(x, *args)``.\r\n Returns a tuple ``(x, fx)`` where ``x`` is a numpy array containing all the\r\n tested points and ``fx`` contains the calculated ``f(x)`` for each ``x``.\r\n \"\"\"\r\n # Check bounds, get number of dimensions\r\n ndims = len(bounds)\r\n if ndims < 1:\r\n raise ValueError('Problem must be at least 1-dimensional.')\r\n for b in bounds:\r\n if len(b) != 2:\r\n raise ValueError(\r\n 'A minimum and maximum must be specified for each dimension.')\r\n\r\n # Check number of points\r\n try:\r\n len(n)\r\n except TypeError:\r\n n = (n,) * ndims\r\n if len(n) != ndims:\r\n if len(n) == 1:\r\n n = (n,) * ndims\r\n else:\r\n raise ValueError(\r\n 'The positional argument n must be a scalar or provide a value'\r\n ' for each dimension.')\r\n npoints = np.array(n)\r\n ntotal = np.prod(npoints)\r\n\r\n # Create points\r\n x = []\r\n n = iter(npoints)\r\n for xmin, xmax in bounds:\r\n x.append(np.linspace(xmin, xmax, next(n)))\r\n\r\n # Create a grid from these points\r\n x = np.array(np.meshgrid(*x, indexing='ij'))\r\n\r\n # Re-organise the grid to be a series of nd-dimensional points\r\n x = x.reshape((ndims, ntotal)).transpose()\r\n\r\n # Evaluate and return\r\nreturn x, evaluate(f, x, parallel=parallel, args=args)\r\n```\r\n\r\nShould we include something like this in Pints?","issue_id":1660245932372,"origin_id":406987846,"user_origin_id":517644,"create_time":1532336203,"update_time":1532336203,"id":1669363911389,"updated_at":"2022-11-25T08:11:51.389000Z","created_at":"2022-11-25T08:11:51.389000Z"},{"_id":"638078c770db72139b110e92","body":"Maybe latin hypercube sampling too","issue_id":1660245932372,"origin_id":416912548,"user_origin_id":517644,"create_time":1535540384,"update_time":1535540384,"id":1669363911543,"updated_at":"2022-11-25T08:11:51.543000Z","created_at":"2022-11-25T08:11:51.543000Z"},{"_id":"638078c770db72139b110e93","body":"And sobol sampling","issue_id":1660245932372,"origin_id":509637753,"user_origin_id":517644,"create_time":1562678213,"update_time":1562678213,"id":1669363911567,"updated_at":"2022-11-25T08:11:51.566000Z","created_at":"2022-11-25T08:11:51.566000Z"},{"_id":"638078c770db72139b110e94","body":"Or perhaps we should implement these as methods inside the `UniformPrior`. Touches on what we discussed today a bit. Any thoughts @ben18785 @martinjrobins ?","issue_id":1660245932372,"origin_id":509637976,"user_origin_id":517644,"create_time":1562678252,"update_time":1562678252,"id":1669363911569,"updated_at":"2022-11-25T08:11:51.569000Z","created_at":"2022-11-25T08:11:51.569000Z"},{"_id":"638078c770db72139b110e95","body":"Yeah, I like the idea! \n\nCould we also use methods from SMC to help with this? As in, we reweight particles according to their functional value, then propagate them?\n\n> On 9 Jul 2019, at 14:17, Michael Clerx <[email protected]> wrote:\n> \n> Or perhaps we should implement these as methods inside the UniformPrior. Touches on what we discussed today a bit. Any thoughts @ben18785 @martinjrobins ?\n> \n> \u2014\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n","issue_id":1660245932372,"origin_id":509643861,"user_origin_id":4490664,"create_time":1562679171,"update_time":1562679171,"id":1669363911572,"updated_at":"2022-11-25T08:11:51.571000Z","created_at":"2022-11-25T08:11:51.571000Z"},{"_id":"638078c770db72139b110e96","body":"I think so! But that sounds suspiciously like you're inventing a sampler :D","issue_id":1660245932372,"origin_id":509647011,"user_origin_id":517644,"create_time":1562679671,"update_time":1562679671,"id":1669363911574,"updated_at":"2022-11-25T08:11:51.573000Z","created_at":"2022-11-25T08:11:51.573000Z"},{"_id":"638078c770db72139b110e97","body":"@MichaelClerx Do we still want this? I'm not sure about it since uniformly sampling a space is easy enough to do and doesn't work well in anywhere above a handful of dimensions.","issue_id":1660245932372,"origin_id":776365560,"user_origin_id":4490664,"create_time":1612920717,"update_time":1612920717,"id":1669363911584,"updated_at":"2022-11-25T08:11:51.583000Z","created_at":"2022-11-25T08:11:51.583000Z"},{"_id":"638078c770db72139b110e98","body":"I'm still thinking it could be very useful e.g. to explore and plot score functions.\r\nPerhaps as several sampling methods on the bounded uniform prior, or something like that.\r\nI also like the idea of having a sort of zero-cleverness brute-force approach as a baseline to compare stuff with (even if that means the method doesn't really work for most cases)\r\nAnd this is something I've done and found useful in the past, so I'd like to keep this ticket open","issue_id":1660245932372,"origin_id":776531603,"user_origin_id":517644,"create_time":1612945462,"update_time":1612945462,"id":1669363911587,"updated_at":"2022-11-25T08:11:51.586000Z","created_at":"2022-11-25T08:11:51.586000Z"}] comment

For example, explore each parameter individually (param x, score y) or plot any two parameters against each other (param 1 x, param 2 z, score y) Use `evaluator` interface to...

new method

Move MCMCSummary to MCMC diagnostics in the docs

[{"_id":"63806ccbbc25e83db00a4e0e","body":"Maybe even the other way around? All other MCMC-only stuff is currently under \"MCMC Samplers\", so perhaps the MCMC diagnostics and this summary should both be there?","issue_id":1660245932374,"origin_id":775918036,"user_origin_id":517644,"create_time":1612875582,"update_time":1612875582,"id":1669360843982,"updated_at":"2022-11-25T07:20:43.982000Z","created_at":"2022-11-25T07:20:43.982000Z"},{"_id":"63806ccbbc25e83db00a4e0f","body":"That would work for me!\n\nGet Outlook for iOS<https:\/\/aka.ms\/o0ukef>\n________________________________\nFrom: Michael Clerx <[email protected]>\nSent: Tuesday, February 9, 2021 2:00:01 PM\nTo: pints-team\/pints <[email protected]>\nCc: David Augustin <[email protected]>; Author <[email protected]>\nSubject: Re: [pints-team\/pints] Move MCMCSummary to MCMC diagnostics in the docs (#1281)\n\n\nMaybe even the other way around? All other MCMC-only stuff is currently under \"MCMC Samplers\", so perhaps the MCMC diagnostics and this summary should both be there?\n\n\u2014\nYou are receiving this because you authored the thread.\nReply to this email directly, view it on GitHub<https:\/\/github.com\/pints-team\/pints\/issues\/1281#issuecomment-775918036>, or unsubscribe<https:\/\/github.com\/notifications\/unsubscribe-auth\/AEY2T3SK6OXSSOV4NQ66B2TS6EWVDANCNFSM4XK6CVJQ>.\n","issue_id":1660245932374,"origin_id":775921089,"user_origin_id":20031982,"create_time":1612875906,"update_time":1612875906,"id":1669360843986,"updated_at":"2022-11-25T07:20:43.985000Z","created_at":"2022-11-25T07:20:43.985000Z"},{"_id":"63806ccbbc25e83db00a4e10","body":"Hey @ben18785 , would this make sense? Or are the diagnostics in `_diagnostic.py` useful for sampling in general?","issue_id":1660245932374,"origin_id":775983475,"user_origin_id":517644,"create_time":1612881221,"update_time":1612881221,"id":1669360843989,"updated_at":"2022-11-25T07:20:43.988000Z","created_at":"2022-11-25T07:20:43.988000Z"},{"_id":"63806ccbbc25e83db00a4e11","body":"Hmm. Well, as it stands the diagnostics are only for MCMC methods but, in the future, I'd envision having other diagnostics in there. But they could always be housed in different folders. I really don't mind either way! To be honest, I would be guided by \"Do what's easiest to change\" here.","issue_id":1660245932374,"origin_id":775989005,"user_origin_id":4490664,"create_time":1612881637,"update_time":1612881637,"id":1669360843992,"updated_at":"2022-11-25T07:20:43.991000Z","created_at":"2022-11-25T07:20:43.991000Z"},{"_id":"63806ccbbc25e83db00a4e12","body":"Cool! I similarly don't mind @DavAug , so you can decide!","issue_id":1660245932374,"origin_id":775992211,"user_origin_id":517644,"create_time":1612881927,"update_time":1612881927,"id":1669360843995,"updated_at":"2022-11-25T07:20:43.994000Z","created_at":"2022-11-25T07:20:43.994000Z"}] comment

After a while I found the `pints.MCMCSummary` object with the MCMC samplers in the documentation, and I was somehow expecting it to be with the diagnostics. Is this just me...

documentation

In [RectangularBoundaries](https://pints.readthedocs.io/en/stable/boundaries.html#pints.RectangularBoundaries) we specify a half-open interval. [RectangularBoundariesTransformation](https://pints.readthedocs.io/en/latest/transformations.html#pints.RectangularBoundariesTransformation), which makes totally sense to link to the RectangularBoundaries class (I think!), however, takes only an open interval. Not sure what's the...

question

Make MALA allow repeated ask()

[{"_id":"6380788f70db72139b110e46","body":"# [Codecov](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994?src=pr&el=h1) Report\n> Merging [#994](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994?src=pr&el=desc) (c211e33) into [master](https:\/\/codecov.io\/gh\/pints-team\/pints\/commit\/a6a1a39c322c8419ff929b82f73ed3f7aa8b72ef?el=desc) (a6a1a39) will **not change** coverage.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/graphs\/tree.svg?width=650&height=150&src=pr&token=ShEiQsiM9b)](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## master #994 +\/- ##\n===========================================\n Coverage 100.00% 100.00% \n===========================================\n Files 84 63 -21 \n Lines 8823 6277 -2546 \n===========================================\n- Hits 8823 6277 -2546 \n```\n\n\n| [Impacted Files](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994?src=pr&el=tree) | Coverage \u0394 | |\n|---|---|---|\n| [pints\/\\_mcmc\/\\_mala.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvX21jbWMvX21hbGEucHk=) | `100.00% <100.00%> (\u00f8)` | |\n| [pints\/io.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvaW8ucHk=) | `100.00% <0.00%> (\u00f8)` | |\n| [pints\/\\_core.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvX2NvcmUucHk=) | `100.00% <0.00%> (\u00f8)` | |\n| [pints\/\\_util.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvX3V0aWwucHk=) | `100.00% <0.00%> (\u00f8)` | |\n| [pints\/noise.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvbm9pc2UucHk=) | `100.00% <0.00%> (\u00f8)` | |\n| [pints\/\\_logger.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvX2xvZ2dlci5weQ==) | `100.00% <0.00%> (\u00f8)` | |\n| [pints\/\\_log\\_pdfs.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvX2xvZ19wZGZzLnB5) | `100.00% <0.00%> (\u00f8)` | |\n| [pints\/toy\/\\_cone.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvdG95L19jb25lLnB5) | `100.00% <0.00%> (\u00f8)` | |\n| [pints\/\\_boundaries.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvX2JvdW5kYXJpZXMucHk=) | `100.00% <0.00%> (\u00f8)` | |\n| [pints\/\\_evaluation.py](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree#diff-cGludHMvX2V2YWx1YXRpb24ucHk=) | `100.00% <0.00%> (\u00f8)` | |\n| ... and [77 more](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994\/diff?src=pr&el=tree-more) | |\n\n------\n\n[Continue to review full report at Codecov](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https:\/\/docs.codecov.io\/docs\/codecov-delta)\n> `\u0394 = absolute <relative> (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994?src=pr&el=footer). Last update [a6a1a39...17feb6e](https:\/\/codecov.io\/gh\/pints-team\/pints\/pull\/994?src=pr&el=lastupdated). Read the [comment docs](https:\/\/docs.codecov.io\/docs\/pull-request-comments).\n","issue_id":1660245932378,"origin_id":539712830,"user_origin_id":22429695,"create_time":1570570264,"update_time":1612787199,"id":1669363855656,"updated_at":"2022-11-25T08:10:55.656000Z","created_at":"2022-11-25T08:10:55.656000Z"},{"_id":"6380788f70db72139b110e47","body":"Cool. Not sure about this one currently, to be honest. Let me think about\nit...\n\nOn Wed, Oct 9, 2019 at 12:17 AM Michael Clerx <[email protected]>\nwrote:\n\n> *@MichaelClerx* commented on this pull request.\n> ------------------------------\n>\n> In pints\/_mcmc\/_mala.py\n> <https:\/\/github.com\/pints-team\/pints\/pull\/994#discussion_r332773584>:\n>\n> > - if not self._ready_for_tell:\n> + if self._proposed is None:\n> raise RuntimeError('Tell called before proposal was set.')\n> - self._ready_for_tell = False\n>\n>\n> It's more in line with what we have in the other MCMC methods, with the\n> exception of the ones that do more complicated stuff in ask() than just set\n> a proposal.\n>\n> So no very strong reason! Just that it's possible to let users ask() as\n> often as they like in this case (and always get the same result), and it\n> lets us remove a variable...\n>\n> We might want to disallow this everywhere instead though? In which case\n> we'd have to update the documentation for SingleChainMCMC and\n> MultiChainMCMC a bit to make this explicit...\n>\n> \u2014\n> You are receiving this because your review was requested.\n> Reply to this email directly, view it on GitHub\n> <https:\/\/github.com\/pints-team\/pints\/pull\/994?email_source=notifications&email_token=ABCILKGLYVAHP6GNXOQGGDLQNUIKBA5CNFSM4I6XHKBKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCHJ6VDY#discussion_r332773584>,\n> or mute the thread\n> <https:\/\/github.com\/notifications\/unsubscribe-auth\/ABCILKFFBVMNY46K47IUA3DQNUIKBANCNFSM4I6XHKBA>\n> .\n>\n","issue_id":1660245932378,"origin_id":539744968,"user_origin_id":4490664,"create_time":1570576880,"update_time":1570576880,"id":1669363855658,"updated_at":"2022-11-25T08:10:55.658000Z","created_at":"2022-11-25T08:10:55.658000Z"},{"_id":"6380788f70db72139b110e48","body":"Made a ticket here #996","issue_id":1660245932378,"origin_id":539747252,"user_origin_id":517644,"create_time":1570577474,"update_time":1570577474,"id":1669363855661,"updated_at":"2022-11-25T08:10:55.660000Z","created_at":"2022-11-25T08:10:55.660000Z"},{"_id":"6380788f70db72139b110e49","body":"Can we re-open discussion on this, @ben18785 and @martinjrobins ? See especially https:\/\/github.com\/pints-team\/pints\/issues\/996","issue_id":1660245932378,"origin_id":600062026,"user_origin_id":517644,"create_time":1584450612,"update_time":1584450612,"id":1669363855664,"updated_at":"2022-11-25T08:10:55.663000Z","created_at":"2022-11-25T08:10:55.663000Z"},{"_id":"6380788f70db72139b110e4a","body":"No thoughts on this?\r\nIt needs to be resolve one of two ways, I think:\r\n\r\n1. Make it so that you can only ask once, in every method: a second call to ask() breaks everything\r\n2. Make it so that you can ask as often as you like, in every method.","issue_id":1660245932378,"origin_id":601685460,"user_origin_id":517644,"create_time":1584708866,"update_time":1584708866,"id":1669363855666,"updated_at":"2022-11-25T08:10:55.666000Z","created_at":"2022-11-25T08:10:55.666000Z"}] comment

See #996 There's no reason not! Also cleaned up the tests a bit

Modify Rhat to compute rank-normalised rhat

[{"_id":"63806abc4b97542c9a3067c7","body":"Sounds good.\n\nOne thing I wonder is whether these sorts of diagnostics might actually be\nbest handled by using an existing package. Ths Arviz package is quite well\nestablished and seems to offer a lot of what we want:\nhttps:\/\/arviz-devs.github.io\/arviz\/_modules\/arviz\/stats\/diagnostics.html\n\nMight save us reinventing the wheel?\n\nOn Sun, Jan 31, 2021 at 2:15 PM David Augustin <[email protected]>\nwrote:\n\n> This issue partially addresses #1063\n> <https:\/\/github.com\/pints-team\/pints\/issues\/1063> .\n>\n> I'd like to first address rank-normalising rhat, because this just involves\n>\n> - Computing the rank statistic of each subchain\n> - Translate rank statistic to Normal quantiles\n>\n> The existing rhat computation using the within and between chain variance\n> is then done using the above constructed normal RV, see\n> https:\/\/arxiv.org\/abs\/1903.08008 for more info.\n>\n> For chains with finite mean and variance this transformation is supposed\n> to leave the Rhat statistic invariant. The real benefit comes for heavy\n> tailed distributions.\n>\n> I would nevertheless argue for adding a flag to the rhat computation:\n>\n> - rank_normalised=True which can be turned off, which will skip the\n> above mentioned transformation.\n>\n> \u2014\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https:\/\/github.com\/pints-team\/pints\/issues\/1273>, or unsubscribe\n> <https:\/\/github.com\/notifications\/unsubscribe-auth\/ABCILKGCIY65KS533NTOLVDS4VQWJANCNFSM4W3MOQ3Q>\n> .\n>\n","issue_id":1660245932380,"origin_id":770395100,"user_origin_id":4490664,"create_time":1612105057,"update_time":1612105057,"id":1669360316557,"updated_at":"2022-11-25T07:11:56.556000Z","created_at":"2022-11-25T07:11:56.556000Z"},{"_id":"63806abc4b97542c9a3067c8","body":"Ahh cool stuff! In that case, we might as well not have these diagnostics in pints and refer to arviz?","issue_id":1660245932380,"origin_id":770396094,"user_origin_id":20031982,"create_time":1612105446,"update_time":1612105456,"id":1669360316561,"updated_at":"2022-11-25T07:11:56.561000Z","created_at":"2022-11-25T07:11:56.561000Z"},{"_id":"63806abc4b97542c9a3067c9","body":"Yeah might be easier. Shall we discuss on Tuesday?\n\nOn Sun, Jan 31, 2021 at 3:04 PM David Augustin <[email protected]>\nwrote:\n\n> Ahh cool stuff! In that case, we might as well not have these diagnostics\n> in pints and refer to arviz?\n>\n> \u2014\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https:\/\/github.com\/pints-team\/pints\/issues\/1273#issuecomment-770396094>,\n> or unsubscribe\n> <https:\/\/github.com\/notifications\/unsubscribe-auth\/ABCILKHL6SNS3RJ2D223VILS4VWPHANCNFSM4W3MOQ3Q>\n> .\n>\n","issue_id":1660245932380,"origin_id":770396276,"user_origin_id":4490664,"create_time":1612105520,"update_time":1612105520,"id":1669360316564,"updated_at":"2022-11-25T07:11:56.564000Z","created_at":"2022-11-25T07:11:56.564000Z"}] comment

This issue partially addresses #1063 . I'd like to first address rank-normalising rhat, because this just involves - [ ] Computing the rank statistic of the pooled samples - [...

Write into CONTRIBUTING.md how to do a release

[{"_id":"638071fe5ae95c7a222fc8f0","body":"Draft, please correct where wrong fergus :D \r\n\r\n- Discuss w other devs \r\n- Create branch\r\n- Inspect changelog to determine next version number. First number: Almost never. Second number: Backwards incompatible changes. Third number: Bugfixes and\/or new functionality only.\r\n - THere might be something about this in contributing.md already. Afaik we're doing multi-digit numbers (1.9 is followed by 1.10) and there is no significance to even\/odd version numbers\r\n- Add version number to changelog and remove empty sections\r\n- Add version number to `pints\/version` file\r\n- Pass review\r\n- Tag with \"v\" followed by version number, e.g. `v0.20.1`\r\n- Merge: watch magic happen as pip updates? @fcooper8472 ?\r\n- Update changelog to have new \"Unreleased\" section with all sections in correct order? Do we do this before the merge but after tagging? Separate PR? Not sure!","issue_id":1660245932382,"origin_id":771632927,"user_origin_id":517644,"create_time":1612272374,"update_time":1612272448,"id":1669362174597,"updated_at":"2022-11-25T07:42:54.597000Z","created_at":"2022-11-25T07:42:54.597000Z"}] comment

infrastructure