Closed jontycarruthersphe closed 4 years ago
Hi Jonty, Looks interesting. could you add some correctness-of-function tests to the PR so that we can automatically check that the class is behaving as expected?
many thanks
Tom
Hi Tom,
Just to check, does this need to resemble a short example, similar to the tests in pygom/tests?
Thanks, Jonty
From: Thomas Finnie notifications@github.com Sent: 20 May 2020 13:51 To: PublicHealthEngland/pygom pygom@noreply.github.com Cc: Jonathan Carruthers Jonathan.Carruthers@phe.gov.uk; Author author@noreply.github.com Subject: Re: [PublicHealthEngland/pygom] Include parameter class & improve plotting (#45)
Hi Jonty, Looks interesting. could you add some correctness-of-function tests to the PR so that we can automatically check that the class is behaving as expected?
many thanks
Tom
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/PublicHealthEngland/pygom/pull/45#issuecomment-631453142, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO5FFMWKIPUIZHPD3M7GJOTRSPGZRANCNFSM4MJVLK3Q.
The information contained in the EMail and any attachments is confidential and intended solely and for the attention and use of the named addressee(s). It may not be disclosed to any other person without the express authority of Public Health England, or the intended recipient, or both. If you are not the intended recipient, you must not disclose, copy, distribute or retain this message or any part of it. This footnote also confirms that this EMail has been swept for computer viruses by Symantec.Cloud, but please re-sweep any attachments before opening or saving. http://www.gov.uk/PHE
I've added some tests that are similar to those for the existing estimation methods. I have also updated the default covariance matrix for the perturbation kernel, it now uses an optimal local covariance matrix.
Now merged into 0.1.7
Parameter class
The parameter class makes it simpler to specify the parameters included in the inference, their prior distributions and whether they should be sampled on a log-scale. The prior distribution can be chosen from those listed in utilR/distn.py. Because of this, the beta distribution has also been included in utilR/distn.py as this can be helpful when inferring probabilities.
A function to create the loss object (e.g. SquareLoss) has been included that makes use of the parameter class. This avoids the need to specify target_param and target_state as these will be determined from the list of parameters provided. It also means that initial guesses for each parameter (theta) no longer need to be specified. This makes sense since these initial guesses weren't being used anyway.
Improved plotting
In plot_pointwise_predictions, it is now possible to plot the solutions for specific states.
In plot_posterior_histograms and plot_scatter, it is now possible to create posterior histograms and pairs plots for specific parameters.