NextStatNextStat

NextStat Documentation

v0.9.0 · Rust 1.93+ · Python 3.11+

NextStat is a high-performance statistical inference engine implemented in Rust with a Python API. One engine covers frequentist and Bayesian methods across particle physics, survival analysis, econometrics, and machine learning — with SIMD, CUDA, and Metal acceleration out of the box.

Choose Your Track

Core Capabilities

  • MLE (L-BFGS-B), profile likelihood, NUTS sampling with ArviZ integration
  • pyhf JSON compatibility — HistFactory workspaces, CLs limits, toy-based and asymptotic tests
  • Survival analysis: Cox PH, Kaplan-Meier, churn, PK/NLME for pharma
  • Econometrics: Panel FE (1-way/2-way HDFE), DiD, event study, IV/2SLS, cluster-robust SE
  • SIMD kernels, Rayon parallelism, CUDA & Metal GPU acceleration
  • Native ROOT TTree reader, Arrow/Parquet I/O, Polars integration
  • Differentiable loss layers for PyTorch, Gymnasium RL environments
  • Rust library, Python package (PyO3/maturin), R bindings, CLI, and WASM playground

Benchmark Highlights

S+B HistFactory (synthetic), 50 channels × 4 bins, 201 parameters. CLs via toy-based q̃_μ. 10,000 + 10,000 toys. Apple M5 (arm64).

NextStat (Rayon)

3.47s

pyhf (10 procs)

50m 11.7s

Up to 868× on published HEP benchmarks

See also: Bayesian, Survival, and Econometrics benchmarks

License

NextStat uses a dual-licensing model: AGPL-3.0-or-later for open source usage, and a Commercial License for proprietary deployments.