skillfed

nfoursid

Implementation of N4SID, Kalman filtering and state-space models

nfoursid v1.0.2 358.9K downloads/30d#7,255 on PyPI28
Permissive license MIT AGING released

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 nfoursid

uv

uv add nfoursid

poetry

poetry add nfoursid

Installing 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3

Tags

state-space model identificationN4SID subspace identificationKalman filtering implementationARMAX ARMA time seriessystem identification algorithmtime series state-space models
system-identificationkalman-filtertime-series

More Scientific/Engineering packages