nfoursid
Implementation of N4SID, Kalman filtering and state-space models
What it is and what it does
NFourSID is a Python implementation of the N4SID (Numerical algorithms for Subspace System IDentification) algorithm, a classical method for identifying state-space models from time-series data. It includes Kalman filtering and supports a family of linear time-series models—ARMAX, ARMA, AR, and MA—all representable as state-space systems. The package depends on numpy for numerical computation, pandas for data handling, and matplotlib for visualization.
The library is designed for researchers and practitioners working with multi-dimensional time-series who need to fit linear dynamical systems. It implements algorithms from foundational control theory literature and is suitable for system identification tasks where you have input-output or output-only measurements and want to recover the underlying state-space structure.
Use it for:
- Identify state-space models from experimental time-series data in control systems or signal processing applications.
- Fit ARMAX or ARMA models to univariate or multivariate time-series for forecasting or analysis.
- Implement Kalman filtering for state estimation in linear dynamical systems.
- Perform subspace identification on combined deterministic-stochastic systems from measurement data.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements the N4SID algorithm for subspace identification of state-space models, including Kalman filtering and support for ARMAX, ARMA, AR, and MA time-series models.
Yes, if you need subspace identification or Kalman filtering for state-space models. The package is stable, permissively licensed, and has low install friction. However, maintenance is aging (last release 386 days ago), so verify that the implementation meets your numerical accuracy requirements and check the documentation and examples before committing to production use.
Install
nfoursid on PyPI
pip
pip install nfoursiduv
uv add nfoursidpoetry
poetry add nfoursidInstalling nfoursid
Before you install
Low friction install with a pure-Python wheel. Maintenance is aging—last release was 386 days ago—but the repository remains active and the package is marked Production/Stable.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install nfoursid
import nfoursid
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Use with numpy arrays or pandas DataFrames for time-series data
# See documentation at https://nfoursid.readthedocs.io/ for examples
Requires Python 3.7 or later.
Verify before relying
- Specific N4SID algorithm implementation details and numerical accuracy compared to the referenced papers
- Performance characteristics on large time-series datasets
- Whether Kalman filtering is provided as a standalone tool or only within state-space models
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — matplotlib, numpy, pandas |
| Maintenance | aging — 386 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 358,929/month — #7,255 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nfoursid-1.0.2-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
controlImplements core operations for analyzing and…
permissive · top 15,000 on PyPI
simdkalmanImplements vectorized Kalman filters that run…
permissive · top 15,000 on PyPI
filterpyFilterPy provides Kalman filters, Extended…
permissive · top 5,000 on PyPI
pykalmanpykalman provides Kalman filtering, smoothing,…
permissive · top 15,000 on PyPI
mamba-ssmMamba-ssm implements state-space model…
permissive · top 15,000 on PyPI
ai4tsAI4TS provides a framework for building machine…
permissive · top 15,000 on PyPI
tbatsImplements BATS and TBATS exponential smoothing…
permissive · top 15,000 on PyPI
lttbDownsamples time series data using the…
permissive · top 15,000 on PyPI
timesfmTimesFM is a pretrained time-series foundation…
permissive · top 15,000 on PyPI
neuralforecastNeuralForecast provides a collection of neural…
permissive · top 15,000 on PyPI