dataeval-plots 0.0.17__tar.gz → 0.0.18__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.
Files changed (17) hide show
  1. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/PKG-INFO +1 -1
  2. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/_version.py +2 -2
  3. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/backends/_shared.py +13 -12
  4. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/protocols.py +12 -12
  5. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/.gitignore +0 -0
  6. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/README.md +0 -0
  7. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/pyproject.toml +0 -0
  8. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/__init__.py +0 -0
  9. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/_registry.py +0 -0
  10. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/backends/__init__.py +0 -0
  11. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/backends/_altair.py +0 -0
  12. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/backends/_base.py +0 -0
  13. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/backends/_feasibility_layout.py +0 -0
  14. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/backends/_matplotlib.py +0 -0
  15. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/backends/_plotly.py +0 -0
  16. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/backends/_seaborn.py +0 -0
  17. {dataeval_plots-0.0.17 → dataeval_plots-0.0.18}/src/dataeval_plots/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: dataeval-plots
3
- Version: 0.0.17
3
+ Version: 0.0.18
4
4
  Summary: DataEval companion package for plotting utilities
5
5
  Project-URL: Homepage, https://dataeval.ai/
6
6
  Project-URL: Repository, https://github.com/aria-ml/dataeval/
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.0.17'
22
- __version_tuple__ = version_tuple = (0, 0, 17)
21
+ __version__ = version = '0.0.18'
22
+ __version_tuple__ = version_tuple = (0, 0, 18)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -15,7 +15,7 @@ import numpy as np
15
15
  import polars as pl
16
16
  from numpy.typing import NDArray
17
17
 
18
- from dataeval_plots.protocols import PlottableFeasibilityDecisions
18
+ from dataeval_plots.protocols import PlottableFeasibilityBounds
19
19
 
20
20
  if TYPE_CHECKING:
21
21
  from dataeval_plots.protocols import (
@@ -1185,7 +1185,7 @@ def _feasibility_band(
1185
1185
 
1186
1186
 
1187
1187
  # The readable name of each source: by DataEval 1.2.0's evidence id (these mirror its performance/_feasibility.py:
1188
- # _SOURCES, _source_name, _unit_noun and FeasibilityOutput._bounds), and by the `source` value of the decisions and
1188
+ # _SOURCES, _source_name, _unit_noun and FeasibilityOutput._bounds), and by the `source` value of the determinations and
1189
1189
  # bounds shape. Any other value shows its own text.
1190
1190
  _SOURCE_NAMES = {
1191
1191
  "replica_ceiling/v1": "repeated labels",
@@ -1258,18 +1258,19 @@ def _evidence_rows(output: PlottableFeasibilityDeterminations) -> pl.DataFrame:
1258
1258
  return pl.DataFrame(rows, schema=_EVIDENCE_SCHEMA)
1259
1259
 
1260
1260
 
1261
- def _decisions_inputs(output: PlottableFeasibilityDecisions) -> tuple[list[dict[str, Any]], pl.DataFrame]:
1261
+ def _bounds_inputs(output: PlottableFeasibilityBounds) -> tuple[list[dict[str, Any]], pl.DataFrame]:
1262
1262
  """
1263
- Read the decisions and bounds shape as the determination rows and evidence frame the bands are built from.
1263
+ Read the determinations and bounds shape as the determination rows and evidence frame the bands are built from.
1264
1264
 
1265
- The rows use the determinations shape's vocabulary, so everything downstream reads either shape alike: an
1266
- unresolved decision with limitation ``conflict`` is an ``evidence_conflict``, and ``envelope`` is a ``ceiling``.
1265
+ The rows use the determinations and evidence shape's vocabulary, so everything downstream reads either shape
1266
+ alike: an unresolved determination with limitation ``conflict`` is an ``evidence_conflict``, and ``envelope`` is a
1267
+ ``ceiling``.
1267
1268
  """
1268
- decisions = list(output.decisions.iter_rows(named=True))
1269
+ determinations = list(output.determinations.iter_rows(named=True))
1269
1270
  bounds = list(output.bounds.iter_rows(named=True))
1270
1271
  rows: list[dict[str, Any]] = []
1271
1272
  evidence: list[dict[str, Any]] = []
1272
- for d in decisions:
1273
+ for d in determinations:
1273
1274
  # ponytail: a private join key in the old reader's vocabulary; typed keys replace it when that reader goes
1274
1275
  spec = json.dumps(
1275
1276
  {
@@ -1283,14 +1284,14 @@ def _decisions_inputs(output: PlottableFeasibilityDecisions) -> tuple[list[dict[
1283
1284
  },
1284
1285
  sort_keys=True,
1285
1286
  )
1286
- conflict = d["decision"] == "unresolved" and d["limitation"] == "conflict"
1287
+ conflict = d["determination"] == "unresolved" and d["limitation"] == "conflict"
1287
1288
  rows.append(
1288
1289
  {
1289
1290
  "target_spec": spec,
1290
1291
  "metric": d["metric"],
1291
1292
  "threshold": d["threshold"],
1292
1293
  "judged_scope": d["judged_scope"],
1293
- "determination": "evidence_conflict" if conflict else d["decision"],
1294
+ "determination": "evidence_conflict" if conflict else d["determination"],
1294
1295
  "ceiling": d["envelope"],
1295
1296
  "ceiling_scope": d["envelope_scope"],
1296
1297
  "witness": d["witness"],
@@ -1331,8 +1332,8 @@ def _decisions_inputs(output: PlottableFeasibilityDecisions) -> tuple[list[dict[
1331
1332
 
1332
1333
  def _feasibility_inputs(output: PlottableFeasibility) -> tuple[list[dict[str, Any]], pl.DataFrame]:
1333
1334
  """The determination rows and evidence frame of a feasibility output in either shape."""
1334
- if isinstance(output, PlottableFeasibilityDecisions):
1335
- return _decisions_inputs(output)
1335
+ if isinstance(output, PlottableFeasibilityBounds):
1336
+ return _bounds_inputs(output)
1336
1337
  return list(output.determinations.iter_rows(named=True)), _evidence_rows(output)
1337
1338
 
1338
1339
 
@@ -14,7 +14,7 @@ The protocol hierarchy:
14
14
  - PlottableDriftMVDC
15
15
  - PlottableDrift
16
16
  - PlottableFeasibilityDeterminations
17
- - PlottableFeasibilityDecisions
17
+ - PlottableFeasibilityBounds
18
18
  - PlottableFeasibility (either of the two feasibility shapes)
19
19
  """
20
20
 
@@ -385,25 +385,25 @@ class PlottableFeasibilityDeterminations(Plottable, Protocol):
385
385
 
386
386
 
387
387
  @runtime_checkable
388
- class PlottableFeasibilityDecisions(Plottable, Protocol):
389
- """Protocol for feasibility plot outputs in the ``decisions`` and ``bounds`` shape.
388
+ class PlottableFeasibilityBounds(Plottable, Protocol):
389
+ """Protocol for feasibility plot outputs in the ``determinations`` and ``bounds`` shape.
390
390
 
391
391
  Required attributes:
392
- - decisions: One row per requirement (DataFrame)
392
+ - determinations: One row per requirement (DataFrame)
393
393
  - bounds: One row per source, requirement and quantity (DataFrame)
394
394
  - meta().state["alpha"]: The call's error budget
395
395
  - plot_type -> 'feasibility'
396
396
 
397
397
  Structures:
398
- - decisions columns: requirement, metric, threshold, judged_scope, class_name, aggregation, ap_functional,
399
- max_false_positive_rate, decision, limitation, envelope, envelope_scope, witness, witness_source
398
+ - determinations columns: requirement, metric, threshold, judged_scope, class_name, aggregation, ap_functional,
399
+ max_false_positive_rate, determination, limitation, envelope, envelope_scope, witness, witness_source
400
400
  - bounds columns: requirement, source, role, quantity, bound_type, information_scope, unit, state, bound,
401
- observed, n; ``requirement`` joins a bound to its decisions row
401
+ observed, n; ``requirement`` joins a bound to its determinations row
402
402
 
403
403
  Enum columns are read as strings, with these values:
404
- - decision: demonstrated_feasible, infeasible_under_recorded_assumptions, not_ruled_out, unresolved
405
- - limitation: only ``conflict`` is read; with decision ``unresolved`` it marks a conflict between a witness and an
406
- envelope
404
+ - determination: demonstrated_feasible, infeasible_under_recorded_assumptions, not_ruled_out, unresolved
405
+ - limitation: only ``conflict`` is read; with determination ``unresolved`` it marks a conflict between a witness
406
+ and an envelope
407
407
  - judged_scope, envelope_scope, information_scope: full_input, fixed_representation, partition_restricted
408
408
  - source, witness_source: local_panels, replicas, knn, linear_probe, user_model (any other value shows its text)
409
409
  - role: envelope, witness. bound_type: lower, upper
@@ -413,14 +413,14 @@ class PlottableFeasibilityDecisions(Plottable, Protocol):
413
413
  """
414
414
 
415
415
  @property
416
- def decisions(self) -> pl.DataFrame: ...
416
+ def determinations(self) -> pl.DataFrame: ...
417
417
  @property
418
418
  def bounds(self) -> pl.DataFrame: ...
419
419
  @property
420
420
  def plot_type(self) -> Literal["feasibility"]: ...
421
421
 
422
422
 
423
- PlottableFeasibility = PlottableFeasibilityDeterminations | PlottableFeasibilityDecisions
423
+ PlottableFeasibility = PlottableFeasibilityDeterminations | PlottableFeasibilityBounds
424
424
  """A feasibility output in either shape; DataEval 1.2.0 gives the first, later releases the second."""
425
425
 
426
426
  # Type alias for all plottable types