evalsuite-python 0.5.3__tar.gz → 0.5.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/CHANGELOG.md +52 -0
- evalsuite_python-0.5.5/LICENSE-APACHE +191 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/PKG-INFO +50 -39
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/README.md +47 -37
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/pyproject.toml +2 -2
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/core/context.py +18 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/core/validation.py +27 -6
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/_common.py +81 -24
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/multilingual.py +25 -13
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/regression/metrics.py +22 -5
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/stats/effect.py +10 -8
- evalsuite_python-0.5.5/src/evalsuite/stats/hypothesis.py +593 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/stats/intervals.py +8 -6
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/stats/paired.py +4 -4
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/_common.py +4 -1
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/generation.py +135 -53
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/judge.py +27 -9
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/semantic.py +41 -7
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/version.py +1 -1
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/vision/detection.py +60 -35
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/vision/segmentation.py +68 -19
- evalsuite_python-0.5.5/tests/llmsys/test_fast_text.py +176 -0
- evalsuite_python-0.5.5/tests/stats/test_fast_paths.py +169 -0
- evalsuite_python-0.5.3/src/evalsuite/stats/hypothesis.py +0 -340
- evalsuite_python-0.5.3/tests/stats/test_fast_paths.py +0 -30
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/.gitignore +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/CONTRIBUTING.md +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/LICENSE +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/__main__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/_bench_metrics.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/_lazy.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/api.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/benchmarks.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/calibration.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/classification/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/classification/_common.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/classification/metrics.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/cli/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/cli/main.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/clinical/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/clinical/metrics.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/clinical/report.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/core/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/core/exceptions.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/core/export.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/core/registry.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/core/result.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/core/types.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/agents.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/code.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/efficiency.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/longcontext.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/robustness.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/safety.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/llmsys/uncertainty.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/plot.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/py.typed +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/regression/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/reporting.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/stats/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/stats/_resolve.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/stats/compare.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/stats/results.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/factuality.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/qa.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/rag.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/reasoning.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/report.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/retrieval.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/spice.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/text/structured.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/src/evalsuite/vision/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/classification/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/classification/test_against_sklearn.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/clinical/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/clinical/test_outputs.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/clinical/test_v020.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/conftest.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/integration/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/integration/test_qa.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/integration/test_readme_examples.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/integration/test_repo_hygiene.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/llmsys/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/llmsys/test_code_longcontext_efficiency.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/llmsys/test_edges.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/llmsys/test_hardening.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/llmsys/test_safety_robustness.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/llmsys/test_uncertainty_agents_multilingual.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/output/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/output/test_benchmarks.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/output/test_cli.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/output/test_plot.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/output/test_reporting.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/regression/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/regression/test_against_sklearn.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/stats/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/stats/test_branches.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/stats/test_compare.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/stats/test_reference.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/text/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/text/test_against_references.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/text/test_text_edges.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/text/test_v040.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/unit/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/unit/test_core.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/unit/test_edges.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/vision/__init__.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/vision/test_detection.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/vision/test_edges.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/vision/test_outputs.py +0 -0
- {evalsuite_python-0.5.3 → evalsuite_python-0.5.5}/tests/vision/test_segmentation.py +0 -0
|
@@ -6,6 +6,58 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.5.5] - 2026-11-09
|
|
10
|
+
|
|
11
|
+
Every benchmark row is now faster than its reference library: 81 of 81 in the main benchmark (geometric mean
|
|
12
|
+
3.07× → **3.29×**) and 172 of 172 per-metric library comparisons (4.67× → **4.97×**). No API changes; results
|
|
13
|
+
are unchanged (all 81 + 204 comparisons agree with the reference, as before).
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Latency percentiles (and every LLM-systems latency/step/token summary): exact selection from a small window
|
|
17
|
+
bracketed by a sorted sample instead of partitioning the whole array; bit-identical to `np.percentile`
|
|
18
|
+
(0.69× → 1.1–2.0× NumPy). Falls back to a full partition if a bracket ever misses.
|
|
19
|
+
- COCO detection: COCOeval's greedy matching runs across all images of a class at once (0.96× → 1.85×
|
|
20
|
+
pycocotools; identical matches).
|
|
21
|
+
- Shapiro–Wilk: SciPy's algorithm (SciPy ≥ 1.12) with Royston's weights cached per sample size, bit-identical
|
|
22
|
+
(0.90× → 11× SciPy); older SciPy keeps its own Fortran implementation.
|
|
23
|
+
- MoverScore: cost matrix computed exactly as POT's `ot.dist`, POT's solver called without redundant marginal
|
|
24
|
+
checks (0.9× → 1.4× POT).
|
|
25
|
+
- Surface distances: erosion by array shifts and direct nearest-point search for small boundaries (k-d trees
|
|
26
|
+
for large ones); average surface distance 0.75× → 1.2× and Hausdorff 1.1× → 1.9× SciPy.
|
|
27
|
+
- METEOR: Porter stems memoised per word (0.74× → 3.5× NLTK).
|
|
28
|
+
- Krippendorff's alpha and CodeBLEU: lower fixed cost on tiny inputs (now faster at every size).
|
|
29
|
+
- README and BENCHMARKS.md rerun on 0.5.5.
|
|
30
|
+
|
|
31
|
+
## [0.5.4] - 2026-11-09
|
|
32
|
+
|
|
33
|
+
Speed release and a second licence. No API changes; every result is unchanged (all 81 benchmark rows and
|
|
34
|
+
204 per-metric comparisons agree with their reference libraries, as before).
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- Dual licence: EvalSuite is now available under **MIT OR Apache-2.0**, at your option (`LICENSE`,
|
|
38
|
+
`LICENSE-APACHE`). Both texts ship in the wheel and sdist; the PyPI licence expression is `MIT OR Apache-2.0`.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- Overall benchmark speed-up 2.06× → **3.07×** (75 of 81 rows faster, was 58); per-metric speed-up against
|
|
42
|
+
reference libraries 2.80× → **4.67×** (165 of 172 faster, was 138).
|
|
43
|
+
- Classification: integer labels are found and encoded without sorting or `searchsorted`, and binary label sets
|
|
44
|
+
come straight from min/max; the confusion matrix counts without unit weights (binary `evaluate()` 37× → 98×
|
|
45
|
+
faster than scikit-learn, 10-class macro F1 3.4× → 16.5×, diagnostic report 0.22× → 1.1×).
|
|
46
|
+
- Statistics: Wilcoxon, Mann–Whitney, Kruskal–Wallis and Friedman rank once with an unstable sort and bincount
|
|
47
|
+
rank sums (2–4× faster than SciPy, identical p-values including SciPy's exact/asymptotic switching); paired
|
|
48
|
+
t-test, χ² and Cramér's V, McNemar, proportion and accuracy intervals compute directly; Fisher's exact test sums
|
|
49
|
+
the hypergeometric pmf in log space (5–7× faster, within 1e-11 of SciPy).
|
|
50
|
+
- Text: TER reuses edit-distance rows across shift candidates (0.61× → 1.5× sacreBLEU); BLEU, self-BLEU and ROUGE
|
|
51
|
+
(0.86× → 1.9× rouge-score)
|
|
52
|
+
build n-grams in C and memoise tokenisation like sacreBLEU and rouge-score; chrF has a tighter matching loop;
|
|
53
|
+
Fleiss' kappa (0.23× → 6×), Krippendorff's alpha (0.77× → 2.0×) and language-ID accuracy (0.38× → 3–7×) are vectorised.
|
|
54
|
+
- MoverScore uses POT's network simplex when POT is installed and an exact assignment formulation otherwise
|
|
55
|
+
(0.07× → 0.9× POT).
|
|
56
|
+
- Hausdorff and surface distances use k-d trees on the surface points instead of whole-image distance transforms.
|
|
57
|
+
- Regression `evaluate()` shares squared errors between MSE, RMSE and R², and task inference checks a short leading
|
|
58
|
+
chunk for fractional values first (0.69× → 1.8× scikit-learn).
|
|
59
|
+
- Benchmarks and README tables rerun on 0.5.4.
|
|
60
|
+
|
|
9
61
|
## [0.5.3] - 2026-11-09
|
|
10
62
|
|
|
11
63
|
Performance release; benchmarks rerun. No API changes.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2026 Manoj Kumar C S and Nikhil D Bharadwaj
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: evalsuite-python
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.5
|
|
4
4
|
Summary: A unified Python framework for machine-learning, clinical, statistical, segmentation, object-detection, uncertainty, and model evaluation.
|
|
5
5
|
Project-URL: Homepage, https://evalsuite-nine.vercel.app
|
|
6
6
|
Project-URL: Documentation, https://evalsuite-nine.vercel.app/docs
|
|
@@ -9,8 +9,9 @@ Project-URL: Issues, https://github.com/mkcs28/evalsuite-python/issues
|
|
|
9
9
|
Project-URL: Changelog, https://github.com/mkcs28/evalsuite-python/blob/main/CHANGELOG.md
|
|
10
10
|
Author: Manoj Kumar C S, Nikhil D Bharadwaj
|
|
11
11
|
Maintainer: Manoj Kumar C S, Nikhil D Bharadwaj
|
|
12
|
-
License-Expression: MIT
|
|
12
|
+
License-Expression: MIT OR Apache-2.0
|
|
13
13
|
License-File: LICENSE
|
|
14
|
+
License-File: LICENSE-APACHE
|
|
14
15
|
Keywords: calibration,classification,clinical,diagnostic accuracy,evaluation,mAP,machine learning,metrics,object detection,regression,reproducibility,segmentation,statistical tests,statistics
|
|
15
16
|
Classifier: Development Status :: 5 - Production/Stable
|
|
16
17
|
Classifier: Intended Audience :: Developers
|
|
@@ -76,14 +77,14 @@ Description-Content-Type: text/markdown
|
|
|
76
77
|
[](https://github.com/mkcs28/evalsuite-python/actions/workflows/ci.yml)
|
|
77
78
|
[](https://pypi.org/project/evalsuite-python/)
|
|
78
79
|
[](https://pypi.org/project/evalsuite-python/)
|
|
79
|
-
[](
|
|
80
|
+
[](#license)
|
|
80
81
|
|
|
81
82
|
**Unified, reproducible evaluation for machine learning, LLM and research.**
|
|
82
83
|
|
|
83
84
|
EvalSuite brings classification, regression, clinical, statistical, segmentation and object-detection
|
|
84
85
|
evaluation into one consistent, validated, documented framework.
|
|
85
86
|
|
|
86
|
-
> **Status: stable (0.5.
|
|
87
|
+
> **Status: stable (0.5.5).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
|
|
87
88
|
> **LLM systems arrive in 0.5.0**: safety, robustness, calibration and uncertainty, agents and tool use,
|
|
88
89
|
> multilingual, code generation, long context and summarization, and inference efficiency and cost.
|
|
89
90
|
|
|
@@ -339,52 +340,56 @@ Input files can be CSV, TSV, Parquet or JSON. Output format follows `--format` o
|
|
|
339
340
|
|
|
340
341
|
## Performance
|
|
341
342
|
|
|
342
|
-
Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.5.
|
|
343
|
+
Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.5.5, Python 3.13,
|
|
343
344
|
NumPy 2.5, Linux x86_64). **Overall: 81 of 81 rows agree with the reference** (largest
|
|
344
|
-
difference 2.5e-14),
|
|
345
|
-
27 cases and three sizes is **
|
|
345
|
+
difference 2.5e-14), 81 are faster, and the geometric-mean speed-up across all
|
|
346
|
+
27 cases and three sizes is **3.29×**. At 1,000,000 samples (pixels for
|
|
346
347
|
segmentation; 1,000 images for detection and 50 for Hausdorff; 10,000 examples for the LLM cases), in
|
|
347
348
|
alphabetical order:
|
|
348
349
|
|
|
349
350
|
| Case | Reference | EvalSuite (ms) | Reference (ms) | Speed-up |
|
|
350
351
|
| --- | --- | ---: | ---: | ---: |
|
|
351
|
-
| 10 classes: macro F1 | scikit-learn |
|
|
352
|
-
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff |
|
|
353
|
-
| binary: 8 label metrics via evaluate() | scikit-learn |
|
|
354
|
-
| binary: ROC AUC | scikit-learn |
|
|
355
|
-
| calibration: slope and intercept | statsmodels |
|
|
356
|
-
| clinical: diagnostic report (7 CIs) | statsmodels |
|
|
357
|
-
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn |
|
|
358
|
-
| decision curve: 99 thresholds | NumPy loop |
|
|
359
|
-
| detection: COCO evaluation (1000 images) | pycocotools |
|
|
360
|
-
| multiple testing: Hochberg (n p-values) | statsmodels |
|
|
361
|
-
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn |
|
|
362
|
-
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx |
|
|
363
|
-
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn |
|
|
364
|
-
| segmentation: Hausdorff distance (50 images) | SciPy |
|
|
365
|
-
| statistics: Cramér's V (5×5 table) | SciPy | 0.
|
|
366
|
-
| statistics: Mann–Whitney U | SciPy |
|
|
367
|
-
| statistics: Welch t-test | SciPy |
|
|
368
|
-
| structured: JSON Schema compliance (10000 documents) | jsonschema |
|
|
369
|
-
| systems: CodeBLEU n-gram terms (1000 programs) | codebleu |
|
|
370
|
-
| systems: confidence AUROC (n answers) | scikit-learn |
|
|
371
|
-
| systems: distribution-shift drop, Welch CI (n scores) | SciPy |
|
|
372
|
-
| systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema |
|
|
373
|
-
| systems: latency p50 / p95 / p99 (n requests) | NumPy |
|
|
374
|
-
| systems: maintainability index (1000 programs) | radon |
|
|
375
|
-
| text: corpus BLEU and chrF (10000 sentences) | sacreBLEU |
|
|
376
|
-
| text: METEOR, exact and stem matches (10000 sentences) | NLTK |
|
|
377
|
-
| text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score |
|
|
352
|
+
| 10 classes: macro F1 | scikit-learn | 7.1 | 113.7 | **15.9×** |
|
|
353
|
+
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 1.4 | 2.8 | **2.0×** |
|
|
354
|
+
| binary: 8 label metrics via evaluate() | scikit-learn | 9.3 | 841.2 | **90.2×** |
|
|
355
|
+
| binary: ROC AUC | scikit-learn | 171.4 | 294.0 | **1.7×** |
|
|
356
|
+
| calibration: slope and intercept | statsmodels | 227.7 | 1188.2 | **5.2×** |
|
|
357
|
+
| clinical: diagnostic report (7 CIs) | statsmodels | 5.0 | 5.4 | **1.1×** |
|
|
358
|
+
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn | 19.5 | 352.0 | **18.1×** |
|
|
359
|
+
| decision curve: 99 thresholds | NumPy loop | 149.2 | 200.9 | **1.3×** |
|
|
360
|
+
| detection: COCO evaluation (1000 images) | pycocotools | 369.0 | 683.1 | **1.9×** |
|
|
361
|
+
| multiple testing: Hochberg (n p-values) | statsmodels | 78.8 | 84.9 | **1.1×** |
|
|
362
|
+
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn | 9.4 | 13.5 | **1.4×** |
|
|
363
|
+
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx | 120.5 | 589.9 | **4.9×** |
|
|
364
|
+
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn | 30.9 | 224.5 | **7.3×** |
|
|
365
|
+
| segmentation: Hausdorff distance (50 images) | SciPy | 7.1 | 13.3 | **1.9×** |
|
|
366
|
+
| statistics: Cramér's V (5×5 table) | SciPy | 0.0 | 0.2 | **11.1×** |
|
|
367
|
+
| statistics: Mann–Whitney U | SciPy | 148.0 | 317.1 | **2.1×** |
|
|
368
|
+
| statistics: Welch t-test | SciPy | 7.1 | 9.7 | **1.4×** |
|
|
369
|
+
| structured: JSON Schema compliance (10000 documents) | jsonschema | 98.0 | 223.3 | **2.3×** |
|
|
370
|
+
| systems: CodeBLEU n-gram terms (1000 programs) | codebleu | 431.3 | 523.0 | **1.2×** |
|
|
371
|
+
| systems: confidence AUROC (n answers) | scikit-learn | 160.5 | 273.0 | **1.7×** |
|
|
372
|
+
| systems: distribution-shift drop, Welch CI (n scores) | SciPy | 6.7 | 7.2 | **1.1×** |
|
|
373
|
+
| systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema | 105.0 | 225.6 | **2.1×** |
|
|
374
|
+
| systems: latency p50 / p95 / p99 (n requests) | NumPy | 10.8 | 12.2 | **1.1×** |
|
|
375
|
+
| systems: maintainability index (1000 programs) | radon | 90.3 | 99.3 | **1.1×** |
|
|
376
|
+
| text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 1435.8 | 2056.4 | **1.4×** |
|
|
377
|
+
| text: METEOR, exact and stem matches (10000 sentences) | NLTK | 124.7 | 384.4 | **3.1×** |
|
|
378
|
+
| text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 354.7 | 618.6 | **1.7×** |
|
|
378
379
|
|
|
379
380
|
**Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`): all 225 registered metrics and
|
|
380
381
|
statistics functions at 10,000 and 100,000 samples. 86 are compared with a reference library, 118 with an
|
|
381
382
|
independent textbook formula and 21 (learned, judge-dependent or randomised) are timed alone; **all 204
|
|
382
|
-
comparisons agree**, and against the libraries the geometric-mean speed-up is **
|
|
383
|
+
comparisons agree**, and against the libraries the geometric-mean speed-up is **4.97×** (172 of 172
|
|
383
384
|
measurements faster). Per-metric table in BENCHMARKS.md.
|
|
384
385
|
|
|
385
|
-
`evaluate()` validates inputs once and builds the confusion
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
**Every row is faster than its reference.** `evaluate()` validates inputs once and builds the confusion
|
|
387
|
+
matrix once for all metrics, and integer labels are encoded without sorting. The rank tests rank the data once
|
|
388
|
+
with a single unstable sort; t-tests, χ², Fisher and McNemar compute their statistics directly, and
|
|
389
|
+
Shapiro–Wilk caches its weights per sample size. Percentiles select exactly from a small bracketed window
|
|
390
|
+
instead of partitioning the whole array; COCO matching runs across all images of a class at once; surface
|
|
391
|
+
distances work on boundary points only; TER, BLEU, ROUGE and METEOR reuse tokenisation, stems and
|
|
392
|
+
edit-distance rows. Every one of these is tested to give the reference's result. Reproduce on
|
|
388
393
|
your machine with `evalsuite benchmark`; full table (1k, 100k and 1M samples, peak memory) and notes in
|
|
389
394
|
[BENCHMARKS.md](https://github.com/mkcs28/evalsuite-python/blob/main/BENCHMARKS.md).
|
|
390
395
|
|
|
@@ -474,4 +479,10 @@ Authors and maintainers: **Manoj Kumar C S** and **Nikhil D Bharadwaj**.
|
|
|
474
479
|
|
|
475
480
|
## License
|
|
476
481
|
|
|
477
|
-
|
|
482
|
+
Dual-licensed under either of
|
|
483
|
+
|
|
484
|
+
- MIT license ([LICENSE](LICENSE))
|
|
485
|
+
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
|
|
486
|
+
|
|
487
|
+
at your option. Unless you explicitly state otherwise, any contribution you submit for inclusion in this
|
|
488
|
+
project shall be dual-licensed as above, without any additional terms or conditions.
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
[](https://github.com/mkcs28/evalsuite-python/actions/workflows/ci.yml)
|
|
4
4
|
[](https://pypi.org/project/evalsuite-python/)
|
|
5
5
|
[](https://pypi.org/project/evalsuite-python/)
|
|
6
|
-
[](
|
|
6
|
+
[](#license)
|
|
7
7
|
|
|
8
8
|
**Unified, reproducible evaluation for machine learning, LLM and research.**
|
|
9
9
|
|
|
10
10
|
EvalSuite brings classification, regression, clinical, statistical, segmentation and object-detection
|
|
11
11
|
evaluation into one consistent, validated, documented framework.
|
|
12
12
|
|
|
13
|
-
> **Status: stable (0.5.
|
|
13
|
+
> **Status: stable (0.5.5).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
|
|
14
14
|
> **LLM systems arrive in 0.5.0**: safety, robustness, calibration and uncertainty, agents and tool use,
|
|
15
15
|
> multilingual, code generation, long context and summarization, and inference efficiency and cost.
|
|
16
16
|
|
|
@@ -266,52 +266,56 @@ Input files can be CSV, TSV, Parquet or JSON. Output format follows `--format` o
|
|
|
266
266
|
|
|
267
267
|
## Performance
|
|
268
268
|
|
|
269
|
-
Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.5.
|
|
269
|
+
Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.5.5, Python 3.13,
|
|
270
270
|
NumPy 2.5, Linux x86_64). **Overall: 81 of 81 rows agree with the reference** (largest
|
|
271
|
-
difference 2.5e-14),
|
|
272
|
-
27 cases and three sizes is **
|
|
271
|
+
difference 2.5e-14), 81 are faster, and the geometric-mean speed-up across all
|
|
272
|
+
27 cases and three sizes is **3.29×**. At 1,000,000 samples (pixels for
|
|
273
273
|
segmentation; 1,000 images for detection and 50 for Hausdorff; 10,000 examples for the LLM cases), in
|
|
274
274
|
alphabetical order:
|
|
275
275
|
|
|
276
276
|
| Case | Reference | EvalSuite (ms) | Reference (ms) | Speed-up |
|
|
277
277
|
| --- | --- | ---: | ---: | ---: |
|
|
278
|
-
| 10 classes: macro F1 | scikit-learn |
|
|
279
|
-
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff |
|
|
280
|
-
| binary: 8 label metrics via evaluate() | scikit-learn |
|
|
281
|
-
| binary: ROC AUC | scikit-learn |
|
|
282
|
-
| calibration: slope and intercept | statsmodels |
|
|
283
|
-
| clinical: diagnostic report (7 CIs) | statsmodels |
|
|
284
|
-
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn |
|
|
285
|
-
| decision curve: 99 thresholds | NumPy loop |
|
|
286
|
-
| detection: COCO evaluation (1000 images) | pycocotools |
|
|
287
|
-
| multiple testing: Hochberg (n p-values) | statsmodels |
|
|
288
|
-
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn |
|
|
289
|
-
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx |
|
|
290
|
-
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn |
|
|
291
|
-
| segmentation: Hausdorff distance (50 images) | SciPy |
|
|
292
|
-
| statistics: Cramér's V (5×5 table) | SciPy | 0.
|
|
293
|
-
| statistics: Mann–Whitney U | SciPy |
|
|
294
|
-
| statistics: Welch t-test | SciPy |
|
|
295
|
-
| structured: JSON Schema compliance (10000 documents) | jsonschema |
|
|
296
|
-
| systems: CodeBLEU n-gram terms (1000 programs) | codebleu |
|
|
297
|
-
| systems: confidence AUROC (n answers) | scikit-learn |
|
|
298
|
-
| systems: distribution-shift drop, Welch CI (n scores) | SciPy |
|
|
299
|
-
| systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema |
|
|
300
|
-
| systems: latency p50 / p95 / p99 (n requests) | NumPy |
|
|
301
|
-
| systems: maintainability index (1000 programs) | radon |
|
|
302
|
-
| text: corpus BLEU and chrF (10000 sentences) | sacreBLEU |
|
|
303
|
-
| text: METEOR, exact and stem matches (10000 sentences) | NLTK |
|
|
304
|
-
| text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score |
|
|
278
|
+
| 10 classes: macro F1 | scikit-learn | 7.1 | 113.7 | **15.9×** |
|
|
279
|
+
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 1.4 | 2.8 | **2.0×** |
|
|
280
|
+
| binary: 8 label metrics via evaluate() | scikit-learn | 9.3 | 841.2 | **90.2×** |
|
|
281
|
+
| binary: ROC AUC | scikit-learn | 171.4 | 294.0 | **1.7×** |
|
|
282
|
+
| calibration: slope and intercept | statsmodels | 227.7 | 1188.2 | **5.2×** |
|
|
283
|
+
| clinical: diagnostic report (7 CIs) | statsmodels | 5.0 | 5.4 | **1.1×** |
|
|
284
|
+
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn | 19.5 | 352.0 | **18.1×** |
|
|
285
|
+
| decision curve: 99 thresholds | NumPy loop | 149.2 | 200.9 | **1.3×** |
|
|
286
|
+
| detection: COCO evaluation (1000 images) | pycocotools | 369.0 | 683.1 | **1.9×** |
|
|
287
|
+
| multiple testing: Hochberg (n p-values) | statsmodels | 78.8 | 84.9 | **1.1×** |
|
|
288
|
+
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn | 9.4 | 13.5 | **1.4×** |
|
|
289
|
+
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx | 120.5 | 589.9 | **4.9×** |
|
|
290
|
+
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn | 30.9 | 224.5 | **7.3×** |
|
|
291
|
+
| segmentation: Hausdorff distance (50 images) | SciPy | 7.1 | 13.3 | **1.9×** |
|
|
292
|
+
| statistics: Cramér's V (5×5 table) | SciPy | 0.0 | 0.2 | **11.1×** |
|
|
293
|
+
| statistics: Mann–Whitney U | SciPy | 148.0 | 317.1 | **2.1×** |
|
|
294
|
+
| statistics: Welch t-test | SciPy | 7.1 | 9.7 | **1.4×** |
|
|
295
|
+
| structured: JSON Schema compliance (10000 documents) | jsonschema | 98.0 | 223.3 | **2.3×** |
|
|
296
|
+
| systems: CodeBLEU n-gram terms (1000 programs) | codebleu | 431.3 | 523.0 | **1.2×** |
|
|
297
|
+
| systems: confidence AUROC (n answers) | scikit-learn | 160.5 | 273.0 | **1.7×** |
|
|
298
|
+
| systems: distribution-shift drop, Welch CI (n scores) | SciPy | 6.7 | 7.2 | **1.1×** |
|
|
299
|
+
| systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema | 105.0 | 225.6 | **2.1×** |
|
|
300
|
+
| systems: latency p50 / p95 / p99 (n requests) | NumPy | 10.8 | 12.2 | **1.1×** |
|
|
301
|
+
| systems: maintainability index (1000 programs) | radon | 90.3 | 99.3 | **1.1×** |
|
|
302
|
+
| text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 1435.8 | 2056.4 | **1.4×** |
|
|
303
|
+
| text: METEOR, exact and stem matches (10000 sentences) | NLTK | 124.7 | 384.4 | **3.1×** |
|
|
304
|
+
| text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 354.7 | 618.6 | **1.7×** |
|
|
305
305
|
|
|
306
306
|
**Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`): all 225 registered metrics and
|
|
307
307
|
statistics functions at 10,000 and 100,000 samples. 86 are compared with a reference library, 118 with an
|
|
308
308
|
independent textbook formula and 21 (learned, judge-dependent or randomised) are timed alone; **all 204
|
|
309
|
-
comparisons agree**, and against the libraries the geometric-mean speed-up is **
|
|
309
|
+
comparisons agree**, and against the libraries the geometric-mean speed-up is **4.97×** (172 of 172
|
|
310
310
|
measurements faster). Per-metric table in BENCHMARKS.md.
|
|
311
311
|
|
|
312
|
-
`evaluate()` validates inputs once and builds the confusion
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
**Every row is faster than its reference.** `evaluate()` validates inputs once and builds the confusion
|
|
313
|
+
matrix once for all metrics, and integer labels are encoded without sorting. The rank tests rank the data once
|
|
314
|
+
with a single unstable sort; t-tests, χ², Fisher and McNemar compute their statistics directly, and
|
|
315
|
+
Shapiro–Wilk caches its weights per sample size. Percentiles select exactly from a small bracketed window
|
|
316
|
+
instead of partitioning the whole array; COCO matching runs across all images of a class at once; surface
|
|
317
|
+
distances work on boundary points only; TER, BLEU, ROUGE and METEOR reuse tokenisation, stems and
|
|
318
|
+
edit-distance rows. Every one of these is tested to give the reference's result. Reproduce on
|
|
315
319
|
your machine with `evalsuite benchmark`; full table (1k, 100k and 1M samples, peak memory) and notes in
|
|
316
320
|
[BENCHMARKS.md](https://github.com/mkcs28/evalsuite-python/blob/main/BENCHMARKS.md).
|
|
317
321
|
|
|
@@ -401,4 +405,10 @@ Authors and maintainers: **Manoj Kumar C S** and **Nikhil D Bharadwaj**.
|
|
|
401
405
|
|
|
402
406
|
## License
|
|
403
407
|
|
|
404
|
-
|
|
408
|
+
Dual-licensed under either of
|
|
409
|
+
|
|
410
|
+
- MIT license ([LICENSE](LICENSE))
|
|
411
|
+
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
|
|
412
|
+
|
|
413
|
+
at your option. Unless you explicitly state otherwise, any contribution you submit for inclusion in this
|
|
414
|
+
project shall be dual-licensed as above, without any additional terms or conditions.
|
|
@@ -7,8 +7,8 @@ name = "evalsuite-python"
|
|
|
7
7
|
dynamic = ["version"]
|
|
8
8
|
description = "A unified Python framework for machine-learning, clinical, statistical, segmentation, object-detection, uncertainty, and model evaluation."
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
license = "MIT"
|
|
11
|
-
license-files = ["LICENSE"]
|
|
10
|
+
license = "MIT OR Apache-2.0"
|
|
11
|
+
license-files = ["LICENSE", "LICENSE-APACHE"]
|
|
12
12
|
requires-python = ">=3.9"
|
|
13
13
|
authors = [{ name = "Manoj Kumar C S" }, { name = "Nikhil D Bharadwaj" }]
|
|
14
14
|
maintainers = [{ name = "Manoj Kumar C S" }, { name = "Nikhil D Bharadwaj" }]
|
|
@@ -92,7 +92,23 @@ class ClassificationContext:
|
|
|
92
92
|
def _index(self) -> dict[Any, int]:
|
|
93
93
|
return {lab.item() if hasattr(lab, "item") else lab: i for i, lab in enumerate(self.labels)}
|
|
94
94
|
|
|
95
|
+
@cached_property
|
|
96
|
+
def _contiguous_int_labels(self) -> Optional[int]:
|
|
97
|
+
"""The first label when labels are consecutive integers lo, lo+1, …; encoding is then y − lo."""
|
|
98
|
+
lab = self.labels
|
|
99
|
+
if (
|
|
100
|
+
lab.dtype.kind in "iu"
|
|
101
|
+
and lab.size
|
|
102
|
+
and np.array_equal(lab, np.arange(int(lab[0]), int(lab[0]) + lab.size))
|
|
103
|
+
):
|
|
104
|
+
return int(lab[0])
|
|
105
|
+
return None
|
|
106
|
+
|
|
95
107
|
def encode(self, y: NDArray[Any]) -> NDArray[np.int64]:
|
|
108
|
+
lo = self._contiguous_int_labels
|
|
109
|
+
if lo is not None and y.dtype.kind in "iu":
|
|
110
|
+
yi = y.astype(np.int64, copy=False)
|
|
111
|
+
return yi - lo if lo else yi
|
|
96
112
|
sorted_labels = np.all(self.labels[:-1] <= self.labels[1:]) if self.labels.dtype != object else False
|
|
97
113
|
if sorted_labels:
|
|
98
114
|
return np.searchsorted(self.labels, y).astype(np.int64)
|
|
@@ -123,6 +139,8 @@ class ClassificationContext:
|
|
|
123
139
|
)
|
|
124
140
|
k = self.labels.shape[0]
|
|
125
141
|
flat = self.true_idx * k + self.pred_idx
|
|
142
|
+
if self.sample_weight is None: # integer counting is faster than summing unit weights
|
|
143
|
+
return np.bincount(flat, minlength=k * k).reshape(k, k).astype(np.float64)
|
|
126
144
|
return np.bincount(flat, weights=self.weights, minlength=k * k).reshape(k, k).astype(np.float64)
|
|
127
145
|
|
|
128
146
|
@cached_property
|