pints-team / pints Goto Github PK
View Code? Open in Web Editor NEWProbabilistic Inference on Noisy Time Series
Home Page: http://pints.readthedocs.io
License: Other
Probabilistic Inference on Noisy Time Series
Home Page: http://pints.readthedocs.io
License: Other
need a function/class that takes a model, a set of parameters, prior information and a data set and returns distributions on the parameters using adaptive covariance MCMC
Following Gary's suggestion on slack
"Gradient Profiling (Giles Hooker) CollocInfer in R - a mixture of Nonlinear least squares and Gradient matching I think… need to read up"
@jonc says: do this!
Maybe look into ABC?
See:
Due to the large filesize, the data should either not be stored at all, or store it in a directory with a suitable .gitignore
file.
This can then be used to test some optimisation methods on echem data
Share interface with #2
Build 1 and then add the rest later
Need a function/class that takes a model, some data, a set of parameters and some bounds and gives the best-fit parameters for that data
@mirams says: R has lots of libraries. We should set up a first method that uses on of those, test how well it works
Test different filtering methods from basic thinning to more sophisticated filters.
need a test script that compares STAN versus our own adaptive covariance MCMC, using
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 parallelise
Martin wrote:
"[C]an you create a score function that depends on the parameters (i.e. incorporate a prior into the score function)?"
Libraries shouldn't affect other libraries, it would be pretty rubbish if people imported pints
and then found matplotlib
's behavior had changed because of the cma
and seaborn
modules.
Ideally, this would automatically update priors too, somehow...?
Two options:
Need to implement each model in the STAN language. Perhaps have a member function for each model that returns the STAN language representation as a string?
Following Gary's suggestion on slack
We need
And tests for each
create a cvsin_type_1 reader for electrochemistry data
Generate data and store in CSV, add different levels of gaussian noise
It would be nice to have a class that implements a Model concept, which takes a cellml file (or string?) defining what the model is.
@MichaelClerx: you have some cellml conversion routines don't you. Would this be useful here?
The current cmaes
method has some unused ipop code:
Once someone figures out a good way to get random samples in the parameter space we can either add an ipop setting to the CMAES
class or rename the class IPOP_CMAES
and create a wrapper called CMAES
that disables it
Methods like IPOP_CMAES
use multiple restarts from random positions in the search space to improve chances of finding optima and reducing chances of getting stuck.
We could add some code that does this automatically, maybe using the Boundaries
class to generate new starting points or perhaps a Prior
class.
Following @mirams suggestion
Not the actual results, just the examples of MCMC
Gary wrote: "Another 'whilst I remember' type thing! It would be good to get boring-old-Fisher Information / Hessian at the MLE and the covariance matrix that that implies, so we could compare max likelihood with Bayesian for some of these problems. Some of our peaks are so unimodal I suspect it may be an excellent approximation for a lot of our problems, and a zillion times faster."
NaN
returned from the score function to trigger a resamplingInf
, because it wants a ranking of scores, and inf
is the worst possible value (note that x < NaN --> false
, x > NaN --> false
, etc)@martinjrobins Jonathan Cooper suggested we set up this repo to have automated testing with Travis (travis-ci.org).
I had a look but it tells me I don't have the authority. Would you like to give this a go?
Sanmitra says it's better :-)
Burn-in should always happen first
But after that, stop either when max iterations is reached or when converged (if it works well, maybe set default max-iter to something very big?)
Maybe update the names of the fixed/inferred ones to make the distinction clearer
Martin wrote:
[C]an you create an efficient score function that depends on the distance between experiment and model in the frequency domain, rather than time domain? I guess the score class can just take an FFT of the values when its created and re-use this?
One simple option is repeated restarts: #29
Another option might be to use PSO to find N good starting points (by running a search with N+M, M>=0 particles and returning the best N results) and then starting a search from each of these
Skipping Kiehn 1999 because it doesn't have equations for the rate constants but a look-up table instead
Possibly based on GPy or GPflow
Need a function/class that takes a model and a data set, passes this into STAN to be solved (using HMC) and returns distributions on the parameters
I think @MichaelClerx changes to CMA-ES to get it working in the new infrastructure removed the parallel aspects of CMA-ES? This is still in there as a comment, so should just need to integrate it with the new code
Chris Gill wrote:
I had an idea last summer about how one might go about doing model selection and parameter fitting in one go using mcmc but didn’t have time to get the details working enough to share it with anyone. It turns out someone has already developed the idea in quite a general framework, and it is useful - it’s called reversible jump mcmc. Essentially you can jump between different parameter spaces provided you have a suitable map between them. The wikipedia page has a fairly short intro to it. I wondered if that might be an interesting direction to try out with the electrochemistry stuff, e.g. determining mechanism of action and the parameters in one (admittedly computationally expensive) go? Just a thought, and I’m sure it will depend on how the different reaction models are specified, but I’ve been meaning to email you about it for some time now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.