Skip to main content

Python port of NNS

Project description

pynns

Python port of the NNS (Nonlinear Nonparametric Statistics) R package.

Status

Alpha / 0.1.0 alpha. Parity-tested port of installed R NNS 12.0, with deferred paths documented below.

The package API is not stable yet. Current work is focused on matching the reference R implementation before adding higher-level Python conveniences. Native extension scaffolding has been removed; PyNNS is currently a pure-Python/NumPy/SciPy port.

Install

uv sync --group dev

Parity tests that miss the local cache require R plus the NNS R package:

install.packages("NNS")

Set PYNNS_OFFLINE=1 to force parity tests to use only the committed R cache.

Deferred paths:

  • nns_var / nns_nowcast
  • vectorized dy_d wrt for non-mean modes (obs, other eval points)
  • dy_d eval_points="obs" parity gap (implemented but not yet R-parity compatible)
  • direct raw-factor nns_m_reg
  • boost threshold on stochastic path (n_features > 10)

The package is GPL-3.0-only and imports as pynns.

For user installs, the planned distribution package is nns-pm:

pip install nns-pm

Run Tests

uv run pytest
uv run ruff format .
uv run ruff check . --fix
uv run ruff check .
uv run mypy

Pytest uses 4 xdist workers by default. Override with PYNNS_PYTEST_WORKERS=<n> uv run pytest for larger or smaller machines.

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: https://github.com/OVVO-Financial/NNS

License

GPL-3.0-only

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nns_pm-0.1.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nns_pm-0.1.0-py3-none-any.whl (102.2 kB view details)

Uploaded Python 3

File details

Details for the file nns_pm-0.1.0.tar.gz.

File metadata

  • Download URL: nns_pm-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for nns_pm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0eb6b1e27b56359f275281d10cd10d50478ffc3ca1d5d205c3faf4e4cc338f83
MD5 9ef2e60cf552a894678c4191edb94ed0
BLAKE2b-256 baf6ebe5402acf2016fcc38d21a22451fb526ee0f3770cf86ce5e6aad7c42654

See more details on using hashes here.

File details

Details for the file nns_pm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nns_pm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 102.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for nns_pm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47e41d2586dd98f5ae329a03ac1f17d9d8a5b114eb578aaccaff8bb7cca0b18a
MD5 a44e288cc9e1fd42d56eb8da852dd62e
BLAKE2b-256 4f564dc9566e4cd5f089a0673b0037f2b5b111d11d5aa3a62053d90f2f367f46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page