Python port of the R NNS 12.1 beta package.
- PyPI package:
nns-pm - Import name:
pynns - Runtime dependencies: NumPy, SciPy
- R required for normal use: no
- Status: alpha, parity-focused
- License: GPL-3.0-only
pip install nns-pmimport numpy as np
from pynns import lpm, nns_dep, nns_reg
x = np.array([-2.0, -1.0, 0.5, 3.0])
downside = lpm(2, 0.0, x)
grid = np.linspace(-2.0, 2.0, 50)
dep = nns_dep(grid, grid**2)
fit = nns_reg(grid, np.sin(grid), point_est=np.array([-1.0, 0.0, 1.0]))- API status and known gaps
- Behavior conventions and intentional divergences
- Benchmarks
- Examples
- Nowcast design
uv sync --group dev
uv run pytest
uv run ruff check .
uv run mypyR and the R NNS package are only needed to regenerate parity fixtures.
NNS was created by Fred Viole as the companion R package to Viole, F. and Nawrocki, D. (2013), Nonlinear Nonparametric Statistics: Using Partial Moments.
Upstream: OVVO-Financial/NNS