--- id: nfoursid version: "1.0.2" license: MIT license_treatment: permissive maintenance: aging --- # nfoursid — Implementation of N4SID, Kalman filtering and state-space models License: permissive · Maintenance: aging · Downloads: 358.9K/mo ## 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 above — 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 pip install nfoursid uv add nfoursid 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_current - Install friction: low - Maintenance: aging - Downloads: 358.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags state-space model identification, N4SID subspace identification, Kalman filtering implementation, ARMAX ARMA time series, system identification algorithm, time series state-space models, system-identification, kalman-filter, time-series [View on SkillFed](https://skillfed.io/packages/nfoursid) · [View on PyPI](https://pypi.org/project/nfoursid/)