Releases: NextStat/nextstat.io
Releases · NextStat/nextstat.io
v0.10.1
v0.10.0
Release v0.10.0
v0.9.9
Fixed
- viz PNG/PDF rendering —
render_to_file()for PNG and PDF formats was silently broken since 0.9.8: thepngandpdffeatures ofns-viz-renderwere not propagated through thenative-renderfeature gate inns-pyandns-cli, causing#[cfg(feature)]guards to compile out all raster/PDF code paths. SVG output was unaffected.
v0.9.8
Added
- ns-cli-py package — standalone
nextstatCLI Python package (bindings/ns-cli-py) withpyproject.tomland__main__.pyentry point. - nextstat-nlp remote workflow runner —
scripts/nlp/nlp_workflow_remote.shfor reproducible NLP pipeline verification on remote hosts (ONNX cache, regimen export, backend cache, internet mocks). - nextstat-nlp
--skip-nextstat-demo— flag to skip demo pipeline in automated runs;--quietmode for suppressing verbose output. - nextstat-nlp regimen fallback tests —
tests/test_regimens_fallback.pyfor graceful degradation when backend unavailable.
Fixed
- Validation-pack pharma determinism — PQ references stabilized for reproducible cross-run validation.
- pip extras — added missing
[all]extra, documented all pip install extras in README and quickstart.
Changed
- Python 3.11+ requirement — documented minimum Python version in installation guide.
- Benchmark artifact sanitization — replaced internal hostnames and server paths with generic placeholders in all public benchmark docs and JSON artifacts.
v0.9.7
Added
- PD models Python API —
emax_predict(),emax_nll(),sigmoid_emax_predict(),sigmoid_emax_nll(),idr_simulate(),idr_nll()exposed to Python. Emax and Sigmoid-Emax for dose-response, IDR Types I–IV for indirect response simulation and likelihood. IDR type specified as string ("inhibit_production","stimulate_loss", etc.). - EGARCH/GJR-GARCH Python API —
egarch11_fit()andgjr_garch11_fit()exposed to Python vianextstat.volatility.egarch()andnextstat.volatility.gjr_garch(). Full EGARCH(1,1) and GJR-GARCH(1,1) MLE with conditional variance and sigma output. - nextstat-nlp 0.2.0 — GLiNER2-based text-to-stats plugin for extracting structured data from clinical text. Three extraction pipelines: survival (
extract_survival_records), informative priors (extract_prior_candidates), and dosing regimens (extract_regimens). Three backend adapters: GLiNER2 Torch, GLiNER2 ONNX, and zero-dependency heuristic (regex). Deterministic time/event/numeric parsers with unit normalisation (days, weeks, months, years, hours). Frozen dataclasses with SHA-256 text hashes andProvenanceBundleaudit trail. Covariates: age, dose, sex, stage, ECOG PS, weight. Golden-file reproducibility tests (57 tests). Benchmark harness and paper scaffold for pharma publication. - nextstat-nlp 0.2.1 — Added optional
mlxbackend (Apple Silicon) via a small Swift CLI using GLiNER2Swift (MLX/Metal). Addeddevice=(Torch) andproviders=/num_threads=(ONNX Runtime) passthroughs to pipelines and benchmark harness. Benchmark harness now reuses a single backend instance to measure warm throughput. - Per-subject dosing for FOCE/SAEM/VPC/GoF — all population PK estimation and diagnostic functions now accept
doses(per-subject dose vector) instead of a single scalardose. Enables proper mixed-effects modeling of clinical data with varying doses across subjects. Python API:doses=[4.0](broadcast) ordoses=[4.0, 3.5, 5.0](per-subject). - CDISC .xpt (SAS Transport v5) reader/writer —
read_xpt()/write_xpt()for FDA-submission SDTM/ADaM datasets, pure Rust with IBM 370 floating-point conversion.xpt_to_nonmem()auto-detects SDTM/ADaM columns (USUBJID, AVAL, ATPTN, etc.) for direct PK modeling. - NONMEM parity whitepaper and benchmark suite — formal validation of FOCE/FOCEI and SAEM against NONMEM reference values on Theophylline (12 subjects, real data), Warfarin (32 subjects, synthetic), and Phase I IV bolus (24 subjects, 2-cpt synthetic). SAEM recovers all parameters within 7% of reference. Whitepaper:
docs/whitepapers/nonmem-parity.md. Rust tests:cargo test -p ns-inference --test nonmem_parity. Python benchmark:scripts/benchmarks/bench_nonmem_parity.py. - NUTS Pathfinder dense metric initialization —
init_strategy="pathfinder"withmetric="dense"now uses the full MLE covariance matrix (from the Hessian) to initialize aDenseCholeskymetric, giving warmup a head-start on the dense preconditioner. Falls back to diagonal when Cholesky fails ormetric="diagonal". - NUTS dense metric reporting —
sample()result now includesmetric_type("diagonal" or "dense"),mass_diag, andinv_mass_matrix(full inverse mass, row-major, only for dense) insample_stats. - NUTS vs CmdStan benchmark suite —
scripts/benchmarks/bench_nuts_vs_cmdstan.pycomparing ESS/s, R-hat, and divergence rates on StdNormal 10D, Eight Schools, and GLM Logistic models. - LAPS GLM model expansion — GPU sampler now supports
"glm_linear","glm_poisson","glm_negbin"(negative binomial), and"glm_composed_logistic"(logistic + random intercept NCP) in addition to the existing"glm_logistic". Full CUDA (f64) and Metal (f32) kernel support. Poisson and NegBin accept optionaloffsetinmodel_data. NegBin estimates dispersion parameterlog_alpha. ComposedGlm uses non-centered parametrization for group-level random intercepts. - SCM Python API —
nextstat.scm()exposes Stepwise Covariate Modeling (forward selection + backward elimination) via Python. Accepts observation-level covariate matrices, auto-centers at median, supports power/proportional/exponential relationships. Returns full audit trace with per-step ΔOFV, p-values, coefficients, and final model parameters. TypedDict return types (ScmResult,ScmStepResult). - IQ/OQ/PQ validation protocol v2.0.0 —
docs/validation/iq-oq-pq-protocol.mdwith 85 numbered test cases across 11 OQ subsections (PK analytical, MLE, FOCE, SAEM, GOF, VPC, SCM, Error Models, LLOQ, NONMEM I/O, Artifacts), PQ cross-validation with NONMEM on Theophylline/Warfarin reference datasets, traceability matrix, and deviation report template. 21 CFR Part 11 / EU Annex 11 / ICH E6(R3) compliant. - 3-compartment PK models — IV bolus and oral absorption with analytical gradients.
- Bioequivalence testing — TOST (average BE), reference-scaled (RSABE), power analysis, and sample size calculation.
- MAP estimation — Maximum A Posteriori estimation with Hessian-based standard errors.
- Monte Carlo clinical trial simulation — simulation engine with PTA (Probability of Target Attainment).
- Dose optimization via PTA grid search — systematic dose finding using PTA target grids.
- ODE-based PK models — transit compartments, Michaelis-Menten elimination, and TMDD (target-mediated drug disposition).
- Multi-compartment FOCE/SAEM — 2-compartment IV and oral population PK estimation.
- Allometric scaling and covariate modeling for FOCE — weight-based allometric exponents and covariate effects in population PK.
- IQ/OQ/PQ validation pack — GxP-ready validation package for pharma environments (21 CFR Part 11 compliant).
- Pharma tutorials — PK modeling guide, NONMEM migration guide, and survival analysis guide.
- Pharma benchmark suite — NS vs NONMEM/Monolix/nlmixr2 comparative benchmarks.
- FOCE
omega_fixedparameter —nlme_foce(omega_fixed=[False, False, True])fixes specific random effects to their initial values during estimation (e.g. near-fix Ka inter-individual variability). - FOCE
diagonal_omegaparameter —nlme_foce(diagonal_omega=True)forces a diagonal Ω matrix, disabling off-diagonal correlation estimation. - 3-compartment SAEM —
nlme_saem(model="3cpt_iv")andnlme_saem(model="3cpt_oral")for 6- and 7-parameter population PK estimation via SAEM. Model dispatch also supports"2cpt_iv"and"2cpt_oral". - FO / ITS / IMP estimation methods —
nlme_foce(method="fo"|"its"|"imp")adds First Order, Iterative Two-Stage, and Importance Sampling MC-EM estimation for all PK models (1/2/3-cpt × IV/oral). IMP uses true IS-EM: MAP + importance sampling from N(η̂, scale²Ω), weighted Ω M-step, ESS/max-weight diagnostics. - SAEM covariance step —
nlme_saem()now computes the covariance step automatically (R/S matrices, sandwich SE, RSE%, condition number) in the returned result dict. - NPDE diagnostics —
pk_npde()Python API for simulation-based Normalized Prediction Distribution Errors. Returns per-observation NPDE/PD, summary statistics, Shapiro-Wilk normality test. - 3-compartment multi-dose superposition —
DosingRegimen::conc_3cpt_iv()andconc_3cpt_oral()with analytical eigenvalue decomposition for multi-dose 3-compartment PK. - SAEM covariate modeling —
nlme_saem(covariates=[...])accepts per-subject covariate dicts with power, exponential, proportional, and categorical relationships for all model types. - SAEM convergence diagnostics —
return_theta_trace=Truestores per-iteration θ trace, Geweke z-scores, and relative parameter change in thesaemsub-dict. - Bootstrap NLME —
bootstrap_nlme()computes nonparametric bootstrap SE and percentile/BCa confidence intervals for SAEM population PK parameters. - Pharma IQ/OQ/PQ auto-runner —
python tests/pharma_validation/runner.pyauto-executes 84 test cases (5 IQ, 54 OQ, 25 PQ) across all pharma verticals: PK analytical correctness, error models, LLOQ handling, MLE, FOCE, SAEM, GOF, VPC, SCM, NONMEM I/O, bioequivalence, trial simulation, Theophylline reference fits, reproducibility, and timing benchmarks. Integrated intovalidation-pack/render_validation_pack.shfor one-command GxP validation pack generation.
v0.9.6
Release v0.9.6
v0.9.5
Release v0.9.5
v0.9.4
Release v0.9.4
v0.9.3
Release v0.9.3
v0.9.2
Release v0.9.2