https://github.com/gitrasheed/pynns
Python port of Nonlinear Nonparametric Statistics R Library
https://github.com/gitrasheed/pynns
Last synced: 5 days ago
JSON representation
Python port of Nonlinear Nonparametric Statistics R Library
- Host: GitHub
- URL: https://github.com/gitrasheed/pynns
- Owner: gitRasheed
- License: gpl-3.0
- Created: 2026-05-10T16:52:47.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-06-06T22:02:51.000Z (16 days ago)
- Last Synced: 2026-06-06T23:08:56.843Z (16 days ago)
- Language: Python
- Size: 23.8 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyNNS
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
## Install
```bash
pip install nns-pm
```
## Quick Use
```python
import 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]))
```
## Documentation
- [API status and known gaps](docs/api_status.md)
- [Behavior conventions and intentional divergences](docs/conventions.md)
- [Benchmarks](docs/benchmarks.md)
- [Examples](docs/examples/README.md)
- [Nowcast design](docs/specs_nowcast.md)
## Development
```bash
uv sync --group dev
uv run pytest
uv run ruff check .
uv run mypy
```
R and the R `NNS` package are only needed to regenerate parity fixtures.
## Attribution
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](https://github.com/OVVO-Financial/NNS)