Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kalman filter log-likelihood #433

Open
martinjrobins opened this issue Aug 3, 2018 · 0 comments · May be fixed by #713
Open

Kalman filter log-likelihood #433

martinjrobins opened this issue Aug 3, 2018 · 0 comments · May be fixed by #713
Assignees

Comments

@martinjrobins
Copy link
Member

martinjrobins commented Aug 3, 2018

For an electrochemistry project I would like to try a kalman filter to estimate a model parameter that varies over time. I would like to incorporate this into pints by writing a log-likelihood class that uses a kalman filter to calculate the marginal likelihood of the other non-varying parameters by using a kalman filter on the varying parameters

The idea is (I think) would be to define the measurements to come from a base model m(p) with fixed parameters p (i.e. any pints model), plus a linear term with the varying parameters x, plus a normal noise term. That is, defined at time points k =1..N the measurements are:

z_k = m_k(p) + H_k x_k + v_k

that you would have a model for the varying parameters as

x_{k+1} = A_k * x_k + w_k

where x_k is the vector of varying parameters (i.e. states), A_k is a matrix defining how the states evolve over time, and w_k are samples from a multivariate normal distribution.

Given a set of fixed paramters p, everything else becomes linear you can use a kalman filter to calculate the likelihood https://en.wikipedia.org/wiki/Kalman_filter#Marginal_likelihood

The user would specify the base model m, the measurement matrix H_k, the transition matrix A_k, and the variances for v_k and w_k (or perhaps these could be unknowns).

Given that this would be able to be used with any pints model, it might be a useful to put in pints. Otherwise I'll keep it over in the electrochemistry repo.

@martinjrobins martinjrobins changed the title Kalman filter log-likelihood (ignore for now, just writing down ideas) Kalman filter log-likelihood Aug 3, 2018
@martinjrobins martinjrobins self-assigned this Aug 3, 2018
@MichaelClerx MichaelClerx linked a pull request Feb 15, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants