Skip to main content

Adaptive Local Polynomial Regression Differentiation framework

Reason this release was yanked:

brocken package layout

Project description

numdiff-research

Adaptive Local Polynomial Regression Differentiation (ALPRD) — an ongoing, honesty-first research project on numerical differentiation of unevenly sampled, noisy 1-D data.

Status: Phase 4 concluded at V2.2 (estimator frozen at the V2.0 formula; V2.2 added physical-sensor validation, a completed WLS-path oracle inequality, two falsified-and-reverted fixes, a documented scope boundary, and the paper draft) (evidence-based stopping condition: all remaining improvements require external literature, external code/data, or genuinely new mathematics — see the V1.4 log section). Current self-assessed publication readiness: 7.5/10. Claims are strictly separated into Proven / Derived / Tested / Hypothesized, and negative results are kept in the record (V1.0's outlier-robustness claim was retracted after a control experiment; V1.0-V1.2's noise estimator was found miscalibrated by 2.2x and fixed in V1.3; two V1.4 hypotheses were tested, falsified, and recorded).

Layout

docs/RESEARCH_LOG.md      the full record: derivations, assumptions, benchmarks,
                          failure analyses, version history (V1.0, V1.1, ...)
src/methods.py            ALPRD variants + all baseline methods
src/datasets.py           benchmark dataset generators (exact ground-truth
                          derivatives, incl. a Lorenz trajectory via solve_ivp)
src/benchmark.py          the full 35-scenario suite; writes results/*.csv
tests/test_methods.py     correctness + equivalence tests (plain python, no
                          pytest required)
results/                  raw per-run CSVs and scaling measurements — every
                          number cited in the log traces to a file here

Reproduce

pip install numpy scipy pandas
python tests/test_methods.py     # 5 tests, all must pass
python src/benchmark.py          # ~2 min; rewrites results/results_v1_1.csv

Everything is seeded (seed=12345 throughout); re-running the suite must reproduce the CSVs bit-for-bit on the same numpy/scipy versions (numpy 2.5.1 / scipy 1.18.0 were used for the committed results).

Method in one paragraph

At each query point, ALPRD fits a weighted local polynomial (tricube kernel, degree 2) over a k-nearest-neighbor window of the actual sample times — no resampling to a uniform grid — and reads the derivative off the linear coefficient, together with a finite-sample variance estimate. V1.1 selects k per point by minimizing an estimated Bias² + Variance (plug-in rule built from the derived leading-order bias and exact variance functionals). V1.2 makes every fit Tukey-biweight-robust (IRLS), refines the curvature pilot at the selected bandwidth, and vectorizes the whole selector; under 3% gross contamination its error is now ~16x lower than any non-robust method in the suite while remaining near-best on clean and noisy data. Known open problems, failure modes, and the improvement queue are tracked in docs/RESEARCH_LOG.md Steps 8–13 of each version.

Quick Start

import numpy as np
from alprd import robust_differentiation

t = np.sort(np.random.uniform(0, 10, 100))
y = np.sin(t) + np.random.normal(0, 0.1, 100)
derivative = robust_differentiation(t, y)

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

alprd-2.2.0.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

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

alprd-2.2.0-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file alprd-2.2.0.tar.gz.

File metadata

  • Download URL: alprd-2.2.0.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for alprd-2.2.0.tar.gz
Algorithm Hash digest
SHA256 615ede463714ae182008bac30d5eb593ad483d76f0e034c3f0022556a4159e82
MD5 ba87a476f883d6a4087266a692e702f6
BLAKE2b-256 07953896325e86c953ed9681683ca19878c7d3a2a87b3f30f84734e57d09649b

See more details on using hashes here.

Provenance

The following attestation bundles were made for alprd-2.2.0.tar.gz:

Publisher: publish.yml on CoderXYZ101/ALPRD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alprd-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: alprd-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for alprd-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6786f042871794b46cf04783231d32e45da9a417a6c03ba765a8ff292e59df3
MD5 98d344254580f19ed6771152bc259e6a
BLAKE2b-256 2d3ebb1a5786c50597688f66e3dc2a3d8cb1a76a92f3c657713af6b072fc18a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for alprd-2.2.0-py3-none-any.whl:

Publisher: publish.yml on CoderXYZ101/ALPRD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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