On Mon, May 14, 2012 at 4:55 PM, Daniel Duckworth <[email protected]> wrote:
> Hello everyone,
>
> I noticed that scikit-learn (and Python in general) seems to be missing a
> decent module for State Space Models.  State Space Models are a type of
> generative model wherein one attempts to estimate the hidden state of a
> system given a sequence of noisy observations.    Observations at a time
> step 't' are assumed conditionally independent of all other variables given
> the hidden state at time 't', and knowing the hidden state at time 't' makes
> all variables before 't' conditionally independent of all other variables
> after time 't'.
>
> The most well-known examples include systems where all states and
> observations are discrete (a la the already-implemented HMM) or distributed
> according to a Gaussian distribution (see Kalman Filter, Kalman Smoothing).
>  When the models don't fall into these two cases, Monte Carlo methods such
> as the Particle Filter are often applied.
>
> I am proposing to extend the HMM module with an implementation of the Kalman
> Filter, Unscented Kalman Filter, and possibly the Particle Filter if the
> community believes it appropriate.
>

Hi Daniel,

I'm not a scikit-learn developer, but we make use of state space
models for some time series estimators in statsmodels. Any
contributions to this area for any Python project would be a huge win.
We've discussed many times extending our current functionality to be
more general. There are some false starts / sketches for a full State
Space Model framework here and a working specific State Space model
for using the Kalman filter to fit these models as well

https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tsa/kalmanf/kalmanfilter.py

it calls a non-general Cython implementation of the ARMA likelihood
function using the linear Gaussian Kalman Filter found here

https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tsa/kalmanf/kalman_loglike.pyx

I've still found speed to be a limiting factor, but our Cython
implementation is fast enough (barely) for optimization.

> This will be my first time committing more than a fix to an Open Source
> project, so I would highly appreciate any comments on what the typical
> process for proposing additions is, how to merge them into a larger project
> like scikit-learn, and any other advice you may have.
>

I will let the scikit-learners answer this in detail, but you will
want to have a github account and make a pull request to get
enhancements considered for inclusion in the project.

Please let us know any progress on this. It's been on my todo list for
quite some time.

Skipper

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to