GC.OS Logo
GC.OS Brandmark

pykalman

pykalman is an open-source Python library for Kalman filtering, smoothing, and state-space models.

Back to Projects

pykalman is a lightweight open-source Python library for Kalman filtering, Kalman smoothing, and state estimation in time series. It provides efficient algorithms for linear and non-linear dynamical systems and is well suited for sequential data modeling and parameter estimation.

The library is intentionally simple and accessible, making it suitable for both practical applications and educational use in state-space modeling.

Purpose

Many real-world problems require robust estimation of hidden states from noisy observations, such as in signal processing, time series analysis, and control systems. pykalman was created to address these tasks with a clean, easy-to-use API built on well-established mathematical foundations.

The focus is on simplicity, reliability, and reproducibility.

Core Features

  • Kalman Filter for linear state-space models

  • Kalman Smoother for backward state estimation

  • Unscented Kalman Filter for non-linear dynamics

  • Expectation-Maximization (EM) algorithm for parameter learning

  • Support for missing or masked observations

  • Online and sequential state estimation

  • Numerically robust square-root filters

Linear State-Space Models

Kalman Filter

The classic Kalman Filter enables recursive state estimation in linear dynamical systems with Gaussian noise.

Kalman Smoother

In addition to forward filtering, the Kalman Smoother improves state estimates by incorporating future observations.

Parameter Estimation

EM Algorithm

pykalman includes an Expectation-Maximization algorithm to automatically learn model parameters from observed data, reducing manual tuning and improving applicability to real-world systems.

Non-Linear Models

Unscented Kalman Filter

For systems with non-linear transition or observation functions, pykalman provides the Unscented Kalman Filter, which more accurately approximates non-linear transformations than linearization-based approaches.

Missing Data and Online Estimation

Handling Missing Observations

The library explicitly supports missing or masked measurements and remains stable when working with incomplete time series.

Online State Estimation

pykalman supports incremental state updates, making it suitable for streaming data and real-time applications.

Numerical Stability

Square-Root Filters

For improved numerical robustness, square-root variants such as the Cholesky Kalman Filter are available, offering greater stability in long sequences or poorly conditioned problems.

Use Cases

  • Time series analysis and signal processing

  • State and trajectory estimation

  • Dynamical systems and control

  • Tracking and sensor fusion

  • Research, teaching, and prototyping

Open Source

pykalman is released as open-source software under the BSD 3-Clause License. Originally created by Daniel Duckworth, the project is actively maintained by the community.

GC.OS supports pykalman as an open-source project enabling transparent, robust, and mathematically grounded state estimation and time series modeling.