evalsuite-python 1.3.0__py3-none-any.whl → 1.3.5__py3-none-any.whl
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/agreement.py +14 -0
- evalsuite/bayes.py +6 -0
- evalsuite/forecasting.py +10 -1
- evalsuite/judging.py +15 -0
- evalsuite/multilabel.py +28 -5
- evalsuite/rag_report.py +6 -0
- evalsuite/recalibration.py +21 -6
- evalsuite/stats/compare.py +19 -18
- evalsuite/stats/intervals.py +35 -2
- evalsuite/stats/paired.py +4 -5
- evalsuite/version.py +1 -1
- {evalsuite_python-1.3.0.dist-info → evalsuite_python-1.3.5.dist-info}/METADATA +7 -3
- {evalsuite_python-1.3.0.dist-info → evalsuite_python-1.3.5.dist-info}/RECORD +17 -17
- {evalsuite_python-1.3.0.dist-info → evalsuite_python-1.3.5.dist-info}/WHEEL +0 -0
- {evalsuite_python-1.3.0.dist-info → evalsuite_python-1.3.5.dist-info}/entry_points.txt +0 -0
- {evalsuite_python-1.3.0.dist-info → evalsuite_python-1.3.5.dist-info}/licenses/LICENSE +0 -0
- {evalsuite_python-1.3.0.dist-info → evalsuite_python-1.3.5.dist-info}/licenses/LICENSE-APACHE +0 -0
evalsuite/agreement.py
CHANGED
|
@@ -106,6 +106,12 @@ class ICCResult:
|
|
|
106
106
|
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
107
107
|
return json.dumps(self.to_dict(), indent=indent)
|
|
108
108
|
|
|
109
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
110
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
111
|
+
from .html_report import _markdown_tables
|
|
112
|
+
|
|
113
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
114
|
+
|
|
109
115
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
110
116
|
d = digits
|
|
111
117
|
rows = ["| Form | ICC | CI | F | p | Meaning |", "| --- | ---: | --- | ---: | ---: | --- |"]
|
|
@@ -186,6 +192,8 @@ def icc(
|
|
|
186
192
|
msw = (ss_c + ss_e) / (n * (k - 1))
|
|
187
193
|
if msr == 0 and mse == 0 and msw == 0:
|
|
188
194
|
raise InputValidationError("All ratings are identical; the ICC is undefined.")
|
|
195
|
+
if msr == 0:
|
|
196
|
+
raise InputValidationError("Subjects do not differ in their mean rating; the ICC is undefined.")
|
|
189
197
|
a = (1 - lv) / 2
|
|
190
198
|
df1, df2_1, df2_3 = n - 1, n * (k - 1), (n - 1) * (k - 1)
|
|
191
199
|
|
|
@@ -288,6 +296,12 @@ class BlandAltman:
|
|
|
288
296
|
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
289
297
|
return json.dumps(self.to_dict(), indent=indent)
|
|
290
298
|
|
|
299
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
300
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
301
|
+
from .html_report import _markdown_tables
|
|
302
|
+
|
|
303
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
304
|
+
|
|
291
305
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
292
306
|
d = digits
|
|
293
307
|
rows = ["| Quantity | Estimate | CI |", "| --- | ---: | --- |"]
|
evalsuite/bayes.py
CHANGED
|
@@ -91,6 +91,12 @@ class BayesComparison:
|
|
|
91
91
|
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
92
92
|
return json.dumps(self.to_dict(), indent=indent)
|
|
93
93
|
|
|
94
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
95
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
96
|
+
from .html_report import _markdown_tables
|
|
97
|
+
|
|
98
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
99
|
+
|
|
94
100
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
95
101
|
d = digits
|
|
96
102
|
rows = ["| Quantity | Value |", "| --- | ---: |"]
|
evalsuite/forecasting.py
CHANGED
|
@@ -229,11 +229,14 @@ def diebold_mariano(
|
|
|
229
229
|
if h < 1:
|
|
230
230
|
raise InputValidationError("h must be at least 1.")
|
|
231
231
|
if loss == "squared":
|
|
232
|
-
|
|
232
|
+
with np.errstate(over="ignore", invalid="ignore"):
|
|
233
|
+
d = (y - a) ** 2 - (y - b) ** 2
|
|
233
234
|
elif loss == "absolute":
|
|
234
235
|
d = np.abs(y - a) - np.abs(y - b)
|
|
235
236
|
else:
|
|
236
237
|
raise InputValidationError("loss must be 'squared' or 'absolute'.")
|
|
238
|
+
if not np.all(np.isfinite(d)):
|
|
239
|
+
raise InputValidationError("The loss differential overflows; rescale the series before testing.")
|
|
237
240
|
n = d.size
|
|
238
241
|
if n < 3 or h >= n:
|
|
239
242
|
raise InputValidationError("The Diebold–Mariano test needs more observations than the horizon (and ≥ 3).")
|
|
@@ -316,6 +319,12 @@ class ForecastReport:
|
|
|
316
319
|
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
317
320
|
return json.dumps(self.to_dict(), indent=indent)
|
|
318
321
|
|
|
322
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
323
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
324
|
+
from .html_report import _markdown_tables
|
|
325
|
+
|
|
326
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
327
|
+
|
|
319
328
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
320
329
|
d = digits
|
|
321
330
|
has_mase = any("mase" in r for r in self.rows)
|
evalsuite/judging.py
CHANGED
|
@@ -151,6 +151,12 @@ class JudgeReport:
|
|
|
151
151
|
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
152
152
|
return json.dumps(self.to_dict(), indent=indent, allow_nan=False)
|
|
153
153
|
|
|
154
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
155
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
156
|
+
from .html_report import _markdown_tables
|
|
157
|
+
|
|
158
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
159
|
+
|
|
154
160
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
155
161
|
d = digits
|
|
156
162
|
pct = f"{self.settings['level'] * 100:g}%"
|
|
@@ -430,6 +436,15 @@ class RubricReport:
|
|
|
430
436
|
def __repr__(self) -> str:
|
|
431
437
|
return self.summary()
|
|
432
438
|
|
|
439
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
440
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
441
|
+
from .html_report import _markdown_tables
|
|
442
|
+
|
|
443
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
444
|
+
|
|
445
|
+
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
446
|
+
return json.dumps(self.to_dict(), indent=indent)
|
|
447
|
+
|
|
433
448
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
434
449
|
d = digits
|
|
435
450
|
rows = ["| Model | Criterion | Mean (CI) | n |", "| --- | --- | --- | ---: |"]
|
evalsuite/multilabel.py
CHANGED
|
@@ -165,6 +165,8 @@ class MultilabelReport:
|
|
|
165
165
|
]
|
|
166
166
|
for k, m in self.metrics.items():
|
|
167
167
|
lines.append(f" {k:<34} {m['value']:.{d}f} ({m['low']:.{d}f}–{m['high']:.{d}f})")
|
|
168
|
+
if s.get("undefined"):
|
|
169
|
+
lines.append(f" Undefined on these data (left out): {', '.join(s['undefined'])}")
|
|
168
170
|
return "\n".join(lines)
|
|
169
171
|
|
|
170
172
|
def __repr__(self) -> str:
|
|
@@ -181,6 +183,12 @@ class MultilabelReport:
|
|
|
181
183
|
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
182
184
|
return json.dumps(self.to_dict(), indent=indent)
|
|
183
185
|
|
|
186
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
187
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
188
|
+
from .html_report import _markdown_tables
|
|
189
|
+
|
|
190
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
191
|
+
|
|
184
192
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
185
193
|
d = digits
|
|
186
194
|
rows = ["| Metric | Value | CI |", "| --- | ---: | --- |"]
|
|
@@ -253,7 +261,12 @@ def multilabel_report(
|
|
|
253
261
|
draws[k].append(v)
|
|
254
262
|
done += chunk
|
|
255
263
|
boot = {k: np.concatenate(v) for k, v in draws.items()}
|
|
256
|
-
|
|
264
|
+
undefined = [k for k, v in point.items() if not math.isfinite(v)]
|
|
265
|
+
metrics = {
|
|
266
|
+
k: {"value": v, **dict(zip(("low", "high"), _ci(boot[k], level)))}
|
|
267
|
+
for k, v in point.items()
|
|
268
|
+
if k not in undefined
|
|
269
|
+
}
|
|
257
270
|
tp = (Y & P).sum(axis=0).astype(float)
|
|
258
271
|
fp = (~Y & P).sum(axis=0).astype(float)
|
|
259
272
|
fn = (Y & ~P).sum(axis=0).astype(float)
|
|
@@ -268,7 +281,8 @@ def multilabel_report(
|
|
|
268
281
|
}
|
|
269
282
|
for j in range(L)
|
|
270
283
|
)
|
|
271
|
-
|
|
284
|
+
settings = {"n": n, "n_labels": L, "level": level, "n_resamples": n_resamples, "undefined": undefined}
|
|
285
|
+
return MultilabelReport(metrics, rows, settings)
|
|
272
286
|
|
|
273
287
|
|
|
274
288
|
# ------------------------------------------------------------------------------------------------- ranking
|
|
@@ -278,10 +292,13 @@ def _run_lists(run: Mapping[Any, Any]) -> dict[str, list[str]]:
|
|
|
278
292
|
out: dict[str, list[str]] = {}
|
|
279
293
|
for q, r in run.items():
|
|
280
294
|
if isinstance(r, Mapping): # doc -> score: by score, ties by document id descending (as trec_eval)
|
|
281
|
-
|
|
282
|
-
|
|
295
|
+
scored = [(float(s), str(d)) for d, s in r.items()]
|
|
296
|
+
if any(not math.isfinite(s) for s, _ in scored):
|
|
297
|
+
raise InputValidationError(f"Query {q!r}: document scores must be finite.")
|
|
298
|
+
ranked = [d for _, d in sorted(scored, reverse=True)]
|
|
283
299
|
else:
|
|
284
|
-
|
|
300
|
+
ranked = [str(d) for d in r]
|
|
301
|
+
out[str(q)] = list(dict.fromkeys(ranked)) # a document counts once, at its first (best) rank
|
|
285
302
|
return out
|
|
286
303
|
|
|
287
304
|
|
|
@@ -352,6 +369,12 @@ class RankingReport:
|
|
|
352
369
|
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
353
370
|
return json.dumps(self.to_dict(), indent=indent)
|
|
354
371
|
|
|
372
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
373
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
374
|
+
from .html_report import _markdown_tables
|
|
375
|
+
|
|
376
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
377
|
+
|
|
355
378
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
356
379
|
d = digits
|
|
357
380
|
ms = self.settings["metrics"]
|
evalsuite/rag_report.py
CHANGED
|
@@ -93,6 +93,12 @@ class RAGReport:
|
|
|
93
93
|
def to_json(self, *, indent: Optional[int] = 2) -> str:
|
|
94
94
|
return json.dumps(self.to_dict(), indent=indent, allow_nan=False)
|
|
95
95
|
|
|
96
|
+
def to_html(self, *, digits: int = 3) -> str:
|
|
97
|
+
"""The Markdown tables as an HTML fragment (escaped), e.g. for :func:`evalsuite.html_report`."""
|
|
98
|
+
from .html_report import _markdown_tables
|
|
99
|
+
|
|
100
|
+
return _markdown_tables(self.to_markdown(digits=digits))
|
|
101
|
+
|
|
96
102
|
def to_markdown(self, *, digits: int = 3) -> str:
|
|
97
103
|
d = digits
|
|
98
104
|
rows = ["| Measure | Value | CI |", "| --- | ---: | --- |"]
|
evalsuite/recalibration.py
CHANGED
|
@@ -183,11 +183,12 @@ def recalibrate(
|
|
|
183
183
|
n_bins: int = 10,
|
|
184
184
|
pos_label: Any = None,
|
|
185
185
|
sample_weight: Any = None,
|
|
186
|
+
classes: Any = None,
|
|
186
187
|
) -> Calibrator:
|
|
187
188
|
"""Fit a recalibration map on held-out labels and probabilities (see the module docstring for methods).
|
|
188
189
|
|
|
189
|
-
For ``method="temperature"`` ``y_prob`` may be an n × k probability matrix
|
|
190
|
-
|
|
190
|
+
For ``method="temperature"`` ``y_prob`` may be an n × k probability matrix: integer labels index the columns,
|
|
191
|
+
other labels map to the sorted labels unless ``classes=`` gives the label of each column."""
|
|
191
192
|
from scipy import optimize
|
|
192
193
|
|
|
193
194
|
if method not in _METHODS:
|
|
@@ -197,11 +198,25 @@ def recalibrate(
|
|
|
197
198
|
y = np.asarray(y_true)
|
|
198
199
|
if p_all.shape[0] != y.size or not np.all(np.isfinite(p_all)):
|
|
199
200
|
raise InputValidationError("y_prob must be a finite n × k matrix with one row per label.")
|
|
200
|
-
classes = np.unique(y)
|
|
201
201
|
k = p_all.shape[1]
|
|
202
|
-
if classes
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
if classes is not None:
|
|
203
|
+
order = list(np.asarray(classes).tolist())
|
|
204
|
+
if len(order) != k:
|
|
205
|
+
raise InputValidationError(f"classes has {len(order)} entries for {k} probability columns.")
|
|
206
|
+
elif np.issubdtype(y.dtype, np.integer):
|
|
207
|
+
order = list(range(k))
|
|
208
|
+
else:
|
|
209
|
+
order = sorted(set(y.tolist()))
|
|
210
|
+
if len(order) != k:
|
|
211
|
+
raise InputValidationError(
|
|
212
|
+
f"y_true has {len(order)} distinct labels but y_prob has {k} columns; pass classes= with the "
|
|
213
|
+
"label of each column."
|
|
214
|
+
)
|
|
215
|
+
pos = {c: i for i, c in enumerate(order)}
|
|
216
|
+
unknown = sorted({str(v) for v in y.tolist() if v not in pos})
|
|
217
|
+
if unknown:
|
|
218
|
+
raise InputValidationError(f"Labels not among the probability columns: {', '.join(unknown[:5])}.")
|
|
219
|
+
cols = np.array([pos[v] for v in y.tolist()])
|
|
205
220
|
logp = np.log(_clip(p_all))
|
|
206
221
|
|
|
207
222
|
def nll_k(log_t: float) -> float:
|
evalsuite/stats/compare.py
CHANGED
|
@@ -17,7 +17,7 @@ from ..core.result import _json_safe, _latex_escape, _latex_table
|
|
|
17
17
|
from ..core.types import ArrayLike
|
|
18
18
|
from ._resolve import MetricCall, as_items, as_observations, is_categorical, resolve_metric
|
|
19
19
|
from .effect import adjust_pvalues
|
|
20
|
-
from .intervals import _check_level, _check_resamples,
|
|
20
|
+
from .intervals import _check_level, _check_resamples, check_resampling, resampled_distributions
|
|
21
21
|
from .paired import delong_test, mcnemar_test
|
|
22
22
|
|
|
23
23
|
if TYPE_CHECKING:
|
|
@@ -347,26 +347,27 @@ def compare(
|
|
|
347
347
|
|
|
348
348
|
rng = np.random.default_rng(random_state)
|
|
349
349
|
use_strata = categorical if stratify is None else bool(stratify)
|
|
350
|
-
|
|
350
|
+
order = [(model, metric) for metric in metric_names for model in names]
|
|
351
|
+
dists = resampled_distributions(
|
|
352
|
+
[calls[k] for k in order], yt.shape[0], n_resamples, rng, yt if use_strata else None, resampling
|
|
353
|
+
)
|
|
351
354
|
a = (1 - level) / 2
|
|
352
355
|
boot: dict[tuple[str, str], np.ndarray] = {}
|
|
353
356
|
estimates: list[dict[str, Any]] = []
|
|
354
|
-
for metric in
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
)
|
|
357
|
+
for (model, metric), (dist, failed) in zip(order, dists):
|
|
358
|
+
call = calls[(model, metric)]
|
|
359
|
+
boot[(model, metric)] = dist
|
|
360
|
+
low, high = np.nanquantile(dist, [a, 1 - a])
|
|
361
|
+
estimates.append(
|
|
362
|
+
{
|
|
363
|
+
"model": model,
|
|
364
|
+
"metric": metric,
|
|
365
|
+
"estimate": call(),
|
|
366
|
+
"low": float(low),
|
|
367
|
+
"high": float(high),
|
|
368
|
+
"failed_resamples": int(failed),
|
|
369
|
+
}
|
|
370
|
+
)
|
|
370
371
|
|
|
371
372
|
pairs = (
|
|
372
373
|
[(m, baseline) for m in names if m != baseline]
|
evalsuite/stats/intervals.py
CHANGED
|
@@ -99,6 +99,38 @@ def resample_indices(
|
|
|
99
99
|
return out
|
|
100
100
|
|
|
101
101
|
|
|
102
|
+
_CHUNK_ELEMENTS = 4_000_000 # resample indices held at once (32 MB of int64)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def resampled_distributions(
|
|
106
|
+
calls: list[MetricCall],
|
|
107
|
+
n: int,
|
|
108
|
+
n_resamples: int,
|
|
109
|
+
rng: np.random.Generator,
|
|
110
|
+
strata: Optional[NDArray[Any]],
|
|
111
|
+
resampling: str,
|
|
112
|
+
) -> list[tuple[NDArray[np.float64], int]]:
|
|
113
|
+
""":func:`bootstrap_distribution` of every call over the same :func:`resample_indices` (paired resamples).
|
|
114
|
+
Plain NumPy resamples are drawn in chunks so memory stays bounded; the draws, and so every result, are
|
|
115
|
+
identical to drawing them all at once."""
|
|
116
|
+
if strata is not None or resampling != "numpy":
|
|
117
|
+
idx = resample_indices(n, n_resamples, rng, strata, resampling)
|
|
118
|
+
return [bootstrap_distribution(c, idx) for c in calls]
|
|
119
|
+
step = max(1, min(n_resamples, _CHUNK_ELEMENTS // max(1, n)))
|
|
120
|
+
parts: list[list[NDArray[np.float64]]] = [[] for _ in calls]
|
|
121
|
+
failed = [0] * len(calls)
|
|
122
|
+
done = 0
|
|
123
|
+
while done < n_resamples:
|
|
124
|
+
rows = min(step, n_resamples - done)
|
|
125
|
+
idx = rng.integers(0, n, size=(rows, n))
|
|
126
|
+
for k, c in enumerate(calls):
|
|
127
|
+
vals, bad = bootstrap_distribution(c, idx)
|
|
128
|
+
parts[k].append(vals)
|
|
129
|
+
failed[k] += bad
|
|
130
|
+
done += rows
|
|
131
|
+
return [(np.concatenate(p), f) for p, f in zip(parts, failed)]
|
|
132
|
+
|
|
133
|
+
|
|
102
134
|
def bootstrap_distribution(call: MetricCall, indices: NDArray[np.int64]) -> tuple[NDArray[np.float64], int]:
|
|
103
135
|
"""Metric value on each resample; resamples where the metric is undefined become NaN."""
|
|
104
136
|
# Binary ROC AUC / average precision: every resample's curve in one parallel compiled call.
|
|
@@ -209,8 +241,9 @@ def bootstrap_ci(
|
|
|
209
241
|
metric_kwargs,
|
|
210
242
|
)
|
|
211
243
|
use_strata = call.categorical if stratify is None else bool(stratify)
|
|
212
|
-
|
|
213
|
-
|
|
244
|
+
((boot, failed),) = resampled_distributions(
|
|
245
|
+
[call], call.n, n_resamples, rng, call.y_true if use_strata else None, resampling
|
|
246
|
+
)
|
|
214
247
|
if failed > MAX_FAILED_FRACTION * n_resamples:
|
|
215
248
|
raise StatisticalTestError(
|
|
216
249
|
f"The metric was undefined on {failed} of {n_resamples} bootstrap resamples. The sample is probably "
|
evalsuite/stats/paired.py
CHANGED
|
@@ -22,11 +22,10 @@ from .intervals import (
|
|
|
22
22
|
_check_level,
|
|
23
23
|
_check_resamples,
|
|
24
24
|
binary_scores,
|
|
25
|
-
bootstrap_distribution,
|
|
26
25
|
check_resampling,
|
|
27
26
|
delong_covariance,
|
|
28
27
|
delong_placements,
|
|
29
|
-
|
|
28
|
+
resampled_distributions,
|
|
30
29
|
)
|
|
31
30
|
from .results import ConfidenceInterval, TestResult
|
|
32
31
|
|
|
@@ -175,9 +174,9 @@ def paired_bootstrap_test(
|
|
|
175
174
|
observed = call_a() - call_b()
|
|
176
175
|
rng = np.random.default_rng(random_state)
|
|
177
176
|
use_strata = call_a.categorical if stratify is None else bool(stratify)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
(da, fa), (db, fb) = resampled_distributions(
|
|
178
|
+
[call_a, call_b], call_a.n, n_resamples, rng, call_a.y_true if use_strata else None, resampling
|
|
179
|
+
)
|
|
181
180
|
diff = da - db
|
|
182
181
|
diff = diff[~np.isnan(diff)]
|
|
183
182
|
centred = diff - observed
|
evalsuite/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: evalsuite-python
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.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
|
|
@@ -104,11 +104,15 @@ evaluation into one consistent, validated, documented framework.
|
|
|
104
104
|
> **On an older version? Upgrade once:** `pip install -U evalsuite-python`. From 1.1.2 on, EvalSuite tells you
|
|
105
105
|
> when a newer release is out (`evalsuite upgrade`).
|
|
106
106
|
|
|
107
|
-
> **Status: stable (1.3.
|
|
107
|
+
> **Status: stable (1.3.5).** [Example notebooks](notebooks/README.md) (Colab) ·
|
|
108
108
|
> [in-browser tools](https://evalsuite-nine.vercel.app/tools) · [changelog](CHANGELOG.md)
|
|
109
109
|
|
|
110
110
|
**What's new**
|
|
111
111
|
|
|
112
|
+
- **1.3.5** — a deep clean of the 1.3 modules (ranking counts a document once and rejects NaN scores, temperature
|
|
113
|
+
scaling maps string labels to the right columns, clearer errors on degenerate data, `to_html` on every report)
|
|
114
|
+
and bounded memory: bootstrap intervals on 100,000 rows peak at about 90 MB instead of 1.6 GB, with identical
|
|
115
|
+
results.
|
|
112
116
|
- **1.3** — a calibration suite (Platt, isotonic, temperature, beta and histogram recalibration; bootstrap
|
|
113
117
|
intervals in `calibration_report`), multi-label and ranking reports (trec_eval-exact nDCG, AP, MRR with
|
|
114
118
|
intervals and randomization tests), forecasting (MASE, RMSSE, pinball loss, interval score, CRPS,
|
|
@@ -610,7 +614,7 @@ scripts, no external requests).
|
|
|
610
614
|
## Evaluation in pull requests
|
|
611
615
|
|
|
612
616
|
```yaml
|
|
613
|
-
- uses: mkcs28/evalsuite-python@v1.3.
|
|
617
|
+
- uses: mkcs28/evalsuite-python@v1.3.5
|
|
614
618
|
with:
|
|
615
619
|
predictions: predictions.csv
|
|
616
620
|
y-true: label
|
|
@@ -5,29 +5,29 @@ evalsuite/_evalci.py,sha256=-sk-XLHPMom0n2xu-xK0H2SwYki7yyeGqpZYqtaaQ0k,16454
|
|
|
5
5
|
evalsuite/_lazy.py,sha256=Ddq0uWuiyxtsT0jBtCSITQPvttiQ7znXAbjkMIOVefk,901
|
|
6
6
|
evalsuite/_native.py,sha256=bIfaOAAu21zAU1AK-5VCLepnw9ba_Bus1LAfY_CVqSE,2337
|
|
7
7
|
evalsuite/_update.py,sha256=XefL43wauH2W38hy9vLh02PWtIVdG9GdiQS6VToaPFI,6071
|
|
8
|
-
evalsuite/agreement.py,sha256=
|
|
8
|
+
evalsuite/agreement.py,sha256=9Ey8RVrBQJDaZ8R0NtS2Zd66m5osJJVUb_Fu4YXq2yc,17334
|
|
9
9
|
evalsuite/api.py,sha256=Y3bevTL0F9Ks-LzprJlWfpfOm_18-r8CH78jf8ldTuA,13583
|
|
10
|
-
evalsuite/bayes.py,sha256=
|
|
10
|
+
evalsuite/bayes.py,sha256=mqtiwNd8FKi4Z_orDqkhBwX8YO8MCC40elwHnKAMBKc,13193
|
|
11
11
|
evalsuite/benchmarks.py,sha256=TWXIhdYPbdDPanCOFL1lRCo3ppRYaDF58PB-o3ZZyTA,37846
|
|
12
12
|
evalsuite/calibration.py,sha256=r2OlJFN2sUd8c9R5vuvOiPxjmExTVb0e1gn09gkRpcs,17449
|
|
13
13
|
evalsuite/cards.py,sha256=LkYy2JI4LxoJbb_Fdr0z768--2JsuBRmaZ9b6NpssnI,18496
|
|
14
14
|
evalsuite/drift.py,sha256=he7Hp5Bv47IVPTEL2EuyZ9VIAdIaIPKq7bBXHGg2n6U,11931
|
|
15
15
|
evalsuite/fairness.py,sha256=ykkfqvHZcrHr526npY1n82S1HdK2W0ng78wOm9Rlv44,16765
|
|
16
|
-
evalsuite/forecasting.py,sha256=
|
|
16
|
+
evalsuite/forecasting.py,sha256=BbOIteWN4VSqa2_29cJgQqQPY27y9iOFxQdyM0DxmfY,16760
|
|
17
17
|
evalsuite/harness.py,sha256=3lfR7T7EdFg0Tlwe_zlfAG-qSOS9ZYYLWQ2MoUJXLTg,21468
|
|
18
18
|
evalsuite/html_report.py,sha256=X1f3_s70Y5COWjJXFrO7Ci2gCZ0bbJKuvS7P_hrrnIE,6877
|
|
19
19
|
evalsuite/integrations.py,sha256=s6N-YyKgIwPYWsdx8A0jewneuiinXbNWtaDVvxfgGFo,9896
|
|
20
|
-
evalsuite/judging.py,sha256=
|
|
20
|
+
evalsuite/judging.py,sha256=Z6KNReVraMsAnCLgr-pHISG_matmcN5ZIEu1Pe5FHo4,21936
|
|
21
21
|
evalsuite/llm_benchmarks.py,sha256=DNVoS0Ho9V5yFhA1GA-PKyHgMB0bAilMFv0RpDQo8xc,6728
|
|
22
22
|
evalsuite/monitor.py,sha256=qW8KGJSm-9boIUQoiylxJRV_yD_jvCGh-rFXNKyPPlI,9006
|
|
23
|
-
evalsuite/multilabel.py,sha256=
|
|
23
|
+
evalsuite/multilabel.py,sha256=KWyJpSriVH9sWqo0TlqbNsjhVov7GkR9o40KOI4jiyQ,19167
|
|
24
24
|
evalsuite/plot.py,sha256=7eOyzoRbg6Aad6OhtIQG3laIioQ8fs2K0YzodjG5rHA,26049
|
|
25
25
|
evalsuite/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
evalsuite/rag_report.py,sha256=
|
|
27
|
-
evalsuite/recalibration.py,sha256=
|
|
26
|
+
evalsuite/rag_report.py,sha256=jFH55E13n1HaHXC1xcTH9LDyM-5Ciuj0JHjG27m9tOs,10284
|
|
27
|
+
evalsuite/recalibration.py,sha256=jtVjEfPcOXSFdjDhn8DRb4clBVV0sKuhf4sLC2i1wF8,12653
|
|
28
28
|
evalsuite/reporting.py,sha256=-LISv9vvEnltT26GtzLjVlxOCcAwmjv4-HyB8_1UF5o,9615
|
|
29
29
|
evalsuite/survival.py,sha256=cNV6dMyPBfF6GJx_GWfDyZSwJaBx4pA3DQY4rvRtwrk,16784
|
|
30
|
-
evalsuite/version.py,sha256=
|
|
30
|
+
evalsuite/version.py,sha256=q-aOZMvxzG70CLgAnJjRMWRtvT2tIp3QMlk0Z1Vr0_E,98
|
|
31
31
|
evalsuite/classification/__init__.py,sha256=ErBIXbBGnhfW6v-1Cn5SegiERoyxNlmO1tEKcLM15mA,833
|
|
32
32
|
evalsuite/classification/_common.py,sha256=3ANV33ix_mnOzvOAG8glyJO-iYVhhTGO0S3YG0ZddB8,4543
|
|
33
33
|
evalsuite/classification/metrics.py,sha256=cP9TAVVk6Pob2VUuxMfQpOakzVmuMOXzGzqO2oGhED8,40575
|
|
@@ -58,11 +58,11 @@ evalsuite/regression/__init__.py,sha256=t2XEHUw6e5tyWBHcEeiog2WWd-wwaxf4m5AIX8dJ
|
|
|
58
58
|
evalsuite/regression/metrics.py,sha256=Qv5hFswxfzE-8wOKysERqsEJT-3kvTXPrkLoZ7s9jbQ,23487
|
|
59
59
|
evalsuite/stats/__init__.py,sha256=mtnEqpvlvscQ3C6ceRr8xLKoSHPQWsWB24pEVlvp6fs,1187
|
|
60
60
|
evalsuite/stats/_resolve.py,sha256=a2Z9rCJ7yNdsIxlCypk94h7Ho-Vewg2ygHahNa7scBU,13829
|
|
61
|
-
evalsuite/stats/compare.py,sha256=
|
|
61
|
+
evalsuite/stats/compare.py,sha256=qNPTNZy_KxO8eLN8JcDY27oOmOtCr_GPqNdVXQdr4bk,18588
|
|
62
62
|
evalsuite/stats/effect.py,sha256=bgnhdCI4vU_Wnv5q7G2ncmtN3n7N1GWiYO4iO3FDI0w,7286
|
|
63
63
|
evalsuite/stats/hypothesis.py,sha256=RCu8yPTOhtetFQ5TlZQWaFu2t-aq56ffaNlEqC-lJbg,24546
|
|
64
|
-
evalsuite/stats/intervals.py,sha256=
|
|
65
|
-
evalsuite/stats/paired.py,sha256=
|
|
64
|
+
evalsuite/stats/intervals.py,sha256=ZhXAGOe354jLCr_P3uxvIcM2Nc7P7kkKjjidbHNzQvY,30721
|
|
65
|
+
evalsuite/stats/paired.py,sha256=uLUo4OuMi8lHciC_4_uBM8suPv6yqGOQcBFtruCn9gg,8598
|
|
66
66
|
evalsuite/stats/planning.py,sha256=cc2i_jm7Gie0-kJxsdonS6jbN1JIIvzmg9pzWwZDfY8,13558
|
|
67
67
|
evalsuite/stats/results.py,sha256=nqXHUiW8l0fQJkbMiunU6Gz-2be1NApZ6Fif2B1K_Yw,4407
|
|
68
68
|
evalsuite/text/__init__.py,sha256=_r0Qi6X7cBcaYMAPRyC15CsTj9Tv8VcqMCtLiSJPogY,3632
|
|
@@ -81,9 +81,9 @@ evalsuite/text/structured.py,sha256=x08yYf2rdlmiA_D_dI1L-fc9quHiBPMKgAGQbG3kJr8,
|
|
|
81
81
|
evalsuite/vision/__init__.py,sha256=9gpOBTPveM_srE6BM-SgCssdQurya2LPHhoMLGOh2A0,991
|
|
82
82
|
evalsuite/vision/detection.py,sha256=Cjr-Y5-pV0wiQk1JiHLYvDdKzMlCEvVQarzY7fqGWw4,32010
|
|
83
83
|
evalsuite/vision/segmentation.py,sha256=tYYsBfEYdPvi94k3dJgp8ODn8X0qKsLW5QAv7KuQMj0,41953
|
|
84
|
-
evalsuite_python-1.3.
|
|
85
|
-
evalsuite_python-1.3.
|
|
86
|
-
evalsuite_python-1.3.
|
|
87
|
-
evalsuite_python-1.3.
|
|
88
|
-
evalsuite_python-1.3.
|
|
89
|
-
evalsuite_python-1.3.
|
|
84
|
+
evalsuite_python-1.3.5.dist-info/METADATA,sha256=DWZC9LSM3gpzuK7XbFlq0axBUQyjbK0g7MeXkq3ETqE,43999
|
|
85
|
+
evalsuite_python-1.3.5.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
86
|
+
evalsuite_python-1.3.5.dist-info/entry_points.txt,sha256=YYIwisn4L4sQt3ntzbM0_Z4yZE2KCu3GJ6KfWL1kIwc,54
|
|
87
|
+
evalsuite_python-1.3.5.dist-info/licenses/LICENSE,sha256=cRRQ6Kk8w2qCqtDSSUJQGy-0rqjmjJG09cZ6iIiMvdc,1095
|
|
88
|
+
evalsuite_python-1.3.5.dist-info/licenses/LICENSE-APACHE,sha256=K4pWYv3dt61u1BuIxjOGBxhgRkpsH4X_dzeIbOILXw0,10784
|
|
89
|
+
evalsuite_python-1.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evalsuite_python-1.3.0.dist-info → evalsuite_python-1.3.5.dist-info}/licenses/LICENSE-APACHE
RENAMED
|
File without changes
|