Wednesday, March 24, 2010

Kalman Filter in Python

The attached Kalman filter code is based on Python example found in book Machine Learning: An Algorithmic Perspective by Stephen Marsland. We simply turned the code into a class which is able to keep its state across invocations, and therefore work in an online fashion. The example code was assuming all data is available before everything started, and ran everything in one mainline.