pykalman

An implementation of the Kalman Filter, Kalman Smoother, and EM algorithm in Python
Download

pykalman Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Daniel Duckworth
  • Publisher web site:
  • http://pykalman.github.com/

pykalman Tags


pykalman Description

pykalman is a the dead-simple Kalman Filter, Kalman Smoother, and EM library for Python:>>> from pykalman import KalmanFilter>>> import numpy as np>>> kf = KalmanFilter(transition_matrices = , ], observation_matrices = , ])>>> measurements = np.asarray(, , ]) # 3 observations>>> kf = kf.em(measurements, n_iter=5)>>> (filtered_state_means, filtered_state_covariances) = kf.filter(measurements)>>> (smoothed_state_means, smoothed_state_covariances) = kf.smooth(measurements)Also included is support for missing measurements:>>> from numpy import ma>>> measurements = ma.asarray(measurements)>>> measurements = ma.masked # measurement at timestep 1 is unobserved>>> kf = kf.em(measurements, n_iter=5)>>> (filtered_state_means, filtered_state_covariances) = kf.filter(measurements)>>> (smoothed_state_means, smoothed_state_covariances) = kf.smooth(measurements)And for the non-linear dynamics via the UnscentedKalmanFilter:>>> I'll fill this in someday...InstallationFor a quick installation: easy_install pykalmanAll of these and pykalman can be installed using easy_install:easy_install numpy scipy Sphinx numpydoc nose pykalmanAlternatively, you can get the latest and greatest from github: git clone git@github.com:pykalman/pykalman.git pykalman cd pykalman sudo python setup.py installProduct's homepage


pykalman Related Software