Metadata-Version: 2.4
Name: nns-pm
Version: 0.2.0
Summary: Python port of nonlinear nonparametric statistics from R NNS
Project-URL: Homepage, https://github.com/gitRasheed/pyNNS
Project-URL: Repository, https://github.com/gitRasheed/pyNNS
Project-URL: Issues, https://github.com/gitRasheed/pyNNS/issues
Project-URL: Source, https://github.com/gitRasheed/pyNNS
Project-URL: Project, https://github.com/gitRasheed/pyNNS
License-Expression: GPL-3.0-only
License-File: LICENSE
Keywords: forecasting,nns,nonparametric,partial moments,regression,statistics
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: numpy
Requires-Dist: scipy
Description-Content-Type: text/markdown

# 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)
