bioscrape
bioscrape copied to clipboard
Add Noise Model to Bioscrape Inference
The following is a very simple and easy way to add a noise model to Bioscrape inference so cost functions are actually probabilities.
Allow two noise models, normal and log-normal (distribution types we should already have built in cython) to be applied at every experimental point. The probability of a data point d_t being produced by a trajectory point x_t given parameters k is: NoiseDist(d_t mean = x_t, variance = v). Use a constant variance for all points.
The likelihood function of parameters k is then L(k) = sum_t -log NoiseDist(d_t, mean = x_t, variance = v).
@sclamons can you confirm I am doing this correctly?
This is correct.
An aside, for future thought:
An implicit assumption here is that the real trajectory of the measured system is exactly the one given by your ODE (or whatever other simulation you use), and that the only source of error is a measurement error around that. That's good enough if you want a point-estimate of your data, but can be hard to fit.
Another kind of cost function uses a hierarchical model, where the parameters of your system are allowed to vary, and you estimate (for simple priors) a) the point estimate of your parameters, b) the variance of each of your parameters, and c) the variance added by measurement error. This has natural physical interpretations -- e.g., temperatures could be slightly different, growth media could be slightly different, internal state of the first cell could be slightly different, and all of these things can change the values of parameters like "rate of transcription". Hierarchical modeling is probably closer to what actually produces data, and it will fit most data better, but it's more expensive to compute and more complex to reason about.
All this is to say that it would be really nice to add hierarchical modeling options, but that can come further down the road.