ml-experiment-stats
Statistical analysis engine for ML experiments with multi-seed evaluation.
Install
pip install ml-experiment-stats # core: numpy, scipy, pyyaml
pip install ml-experiment-stats[parquet] # + pyarrow
pip install ml-experiment-stats[plots] # + matplotlib
pip install ml-experiment-stats[bayesian] # + baycomp
pip install ml-experiment-stats[all] # everything
Usage
SDK
from ml_experiment_stats import RunResult, ResultsCollector, ExperimentConfig
from ml_experiment_stats.statistics import run_statistical_analysis
from ml_experiment_stats.report import save_report
collector = ResultsCollector("results/")
collector.add(RunResult(seed=42, method="baseline", metrics={"mse": 0.12}))
collector.add(RunResult(seed=42, method="proposed", metrics={"mse": 0.08}))
collector.save()
save_report("results/")
CLI
mlstats summary --results-dir results/
mlstats report --results-dir results/
mlstats diff results_new/ results_baseline/
mlstats check --config experiment.yaml --results-dir results/
Orchestrator
from ml_experiment_stats import ExperimentConfig, RunResult, set_seed
from ml_experiment_stats.cli_run import run_with
def run_single(config: ExperimentConfig, seed: int) -> list[RunResult]:
set_seed(seed)
# your experiment logic here
return [RunResult(seed=seed, method="my_method", metrics={"acc": 0.95})]
run_with(run_single)
Statistical Methods
- Pairwise: Wilcoxon signed-rank, paired t-test, auto (Shapiro-Wilk selection)
- Omnibus: Friedman test, Nemenyi post-hoc with Critical Difference diagrams
- Bayesian: Signed-rank test with ROPE (Region of Practical Equivalence)
- Effect sizes: Cliff's delta (non-parametric), Cohen's d (parametric)
- Corrections: Holm-Bonferroni, Bonferroni
- Confidence intervals: BCa bootstrap
- Power analysis: Post-hoc power with recommended sample size
- Multi-dataset: Cross-dataset Friedman analysis (Demsar 2006)
Output
make run / run_with() produces:
| File | Format | For |
|---|---|---|
summary.json |
JSON | Per-method mean/std/min/max |
statistics.json |
JSON | All pairwise tests, Friedman, Bayesian, power |
report.json |
JSON | Structured report for LLM agents |
report.md |
Markdown | Human-readable report |
figures/ |
PNG/PDF | Bar plots, per-seed, heatmaps, CD diagrams |
License
Metadata
Release files for ml-experiment-stats 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ml_experiment_stats-0.1.0.tar.gz | 89.5 kB | With provenance | Details for ml_experiment_stats-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ml_experiment_stats-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ml_experiment_stats-0.1.0-py3-none-any.whl |
Total release size: 115.1 kB
Release files / ml_experiment_stats-0.1.0.tar.gz
| Download URL | ml_experiment_stats-0.1.0.tar.gz |
|---|---|
| Size | 89.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cd6e6fe829fb030459c12f5cf8c0ffc316e669fedf0fb2e326f791be9e83e62
|
|
BLAKE2b-256 checksum How to use checksums |
571af0910d807b09f0f2fd89fcf7aa5b5bb8b6d2a5d756890331353b4c11d29e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.
Transparency logRelease files / ml_experiment_stats-0.1.0-py3-none-any.whl
| Download URL | ml_experiment_stats-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d56543e124abb0dfc9e62d749168c0291c9fd236c88dcab39635efb1d279b27
|
|
BLAKE2b-256 checksum How to use checksums |
7535471d542afc169bb83fee2967b2c35f56a91ba6b486948cd8e9c8e105ede5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.
Transparency logSecurity for ml-experiment-stats 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ml_experiment_stats-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.