tscf-eval 1.2.0__tar.gz → 1.2.1__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 (46) hide show
  1. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/PKG-INFO +3 -3
  2. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/README.md +2 -2
  3. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/pyproject.toml +1 -1
  4. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/sets.py +2 -1
  5. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/.gitignore +0 -0
  6. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/LICENSE +0 -0
  7. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/__init__.py +0 -0
  8. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/benchmark/__init__.py +0 -0
  9. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/benchmark/config.py +0 -0
  10. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/benchmark/multi_criteria.py +0 -0
  11. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/benchmark/results.py +0 -0
  12. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/benchmark/runner.py +0 -0
  13. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/benchmark/selection.py +0 -0
  14. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/__init__.py +0 -0
  15. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/base.py +0 -0
  16. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/cels.py +0 -0
  17. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/comte.py +0 -0
  18. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/glacier.py +0 -0
  19. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/latent_cf.py +0 -0
  20. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/native_guide.py +0 -0
  21. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/tsevo.py +0 -0
  22. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/utils/__init__.py +0 -0
  23. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/utils/_adam.py +0 -0
  24. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/utils/_dba.py +0 -0
  25. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/utils/_distance.py +0 -0
  26. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/utils/_nun.py +0 -0
  27. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/utils/_predict.py +0 -0
  28. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/counterfactuals/utils/_shape.py +0 -0
  29. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/data_loader/__init__.py +0 -0
  30. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/data_loader/base.py +0 -0
  31. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/data_loader/files.py +0 -0
  32. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/data_loader/tsc_data.py +0 -0
  33. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/data_loader/ucr.py +0 -0
  34. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/__init__.py +0 -0
  35. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/base.py +0 -0
  36. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/evaluator.py +0 -0
  37. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/__init__.py +0 -0
  38. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/_utils.py +0 -0
  39. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/core.py +0 -0
  40. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/distribution.py +0 -0
  41. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/hardness.py +0 -0
  42. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/model.py +0 -0
  43. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/performance.py +0 -0
  44. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/stability.py +0 -0
  45. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/evaluator/metrics/structure.py +0 -0
  46. {tscf_eval-1.2.0 → tscf_eval-1.2.1}/src/tscf_eval/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tscf-eval
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: TSCFEval - A model-agnostic framework for systematic evaluation of counterfactual explanations in time series classification
5
5
  Project-URL: Homepage, https://github.com/bzamith/tscf-eval
6
6
  Project-URL: Documentation, https://tscf-eval.readthedocs.io
@@ -67,7 +67,7 @@ Description-Content-Type: text/markdown
67
67
  **TSCFEval** is a model-agnostic Python framework for systematic evaluation of counterfactual explanations in Time Series Classification (TSC). Unlike existing libraries that focus on counterfactual generation, TSCFEval is specifically designed for counterfactual evaluation, consolidating fragmented evaluation practices from the TSC counterfactual literature into a unified, extensible toolkit.
68
68
 
69
69
  Given a time series classifier and a set of counterfactual explanations, TSCFEval provides:
70
- - **11 evaluation metrics** organized into **six quality dimensions** (core quality, distribution alignment, structural properties, model behavior, stability, and computational performance)
70
+ - **14 evaluation metrics** organized into **seven quality dimensions** (core quality, distribution alignment, structural properties, model behavior, stability, instance hardness, and computational performance)
71
71
  - **Weighted scalarization** for aggregating metrics into composite scores, enabling customizable method ranking
72
72
  - **Confidence-stratified instance selection** for benchmarking across the decision boundary
73
73
  - **Three benchmarking scenarios**: single dataset with multiple CF methods, single dataset with multiple classifiers, and multiple datasets with a fixed classifier
@@ -136,7 +136,7 @@ TSCFEval implements 14 metrics organized into seven quality dimensions:
136
136
  | | `Diversity` | Variety among multiple CFs via DPP (Euclidean or DTW) | maximize | Mothilal et al., 2020 |
137
137
  | | `Connectedness` | Whether CFs are joined to the training data by a continuous path, rather than plausible in isolation (Euclidean or DTW) | maximize | Laugel et al., 2019 |
138
138
  | **Structure** | `Contiguity` | How contiguous the edits are | maximize | Delaney et al., 2021; Ates et al., 2021 |
139
- | | `Composition` | Number and length of edit segments | minimize | Delaney et al., 2021; Ates et al., 2021 |
139
+ | | `Composition` | Ratio of mean segment length to mean number of segments (fewer, longer edits score higher) | maximize | Delaney et al., 2021; Ates et al., 2021 |
140
140
  | **Model Behavior** | `Confidence` | Model confidence on original and CF predictions | maximize | Le et al., 2023 |
141
141
  | | `Controllability` | Ease of reverting CF changes via single-feature edits | maximize | Verma et al., 2024 |
142
142
  | **Stability** | `Robustness` | Local Lipschitz-like stability across *neighbouring instances* (Euclidean or DTW) | minimize | Ates et al., 2021 |
@@ -7,7 +7,7 @@
7
7
  **TSCFEval** is a model-agnostic Python framework for systematic evaluation of counterfactual explanations in Time Series Classification (TSC). Unlike existing libraries that focus on counterfactual generation, TSCFEval is specifically designed for counterfactual evaluation, consolidating fragmented evaluation practices from the TSC counterfactual literature into a unified, extensible toolkit.
8
8
 
9
9
  Given a time series classifier and a set of counterfactual explanations, TSCFEval provides:
10
- - **11 evaluation metrics** organized into **six quality dimensions** (core quality, distribution alignment, structural properties, model behavior, stability, and computational performance)
10
+ - **14 evaluation metrics** organized into **seven quality dimensions** (core quality, distribution alignment, structural properties, model behavior, stability, instance hardness, and computational performance)
11
11
  - **Weighted scalarization** for aggregating metrics into composite scores, enabling customizable method ranking
12
12
  - **Confidence-stratified instance selection** for benchmarking across the decision boundary
13
13
  - **Three benchmarking scenarios**: single dataset with multiple CF methods, single dataset with multiple classifiers, and multiple datasets with a fixed classifier
@@ -76,7 +76,7 @@ TSCFEval implements 14 metrics organized into seven quality dimensions:
76
76
  | | `Diversity` | Variety among multiple CFs via DPP (Euclidean or DTW) | maximize | Mothilal et al., 2020 |
77
77
  | | `Connectedness` | Whether CFs are joined to the training data by a continuous path, rather than plausible in isolation (Euclidean or DTW) | maximize | Laugel et al., 2019 |
78
78
  | **Structure** | `Contiguity` | How contiguous the edits are | maximize | Delaney et al., 2021; Ates et al., 2021 |
79
- | | `Composition` | Number and length of edit segments | minimize | Delaney et al., 2021; Ates et al., 2021 |
79
+ | | `Composition` | Ratio of mean segment length to mean number of segments (fewer, longer edits score higher) | maximize | Delaney et al., 2021; Ates et al., 2021 |
80
80
  | **Model Behavior** | `Confidence` | Model confidence on original and CF predictions | maximize | Le et al., 2023 |
81
81
  | | `Controllability` | Ease of reverting CF changes via single-feature edits | maximize | Verma et al., 2024 |
82
82
  | **Stability** | `Robustness` | Local Lipschitz-like stability across *neighbouring instances* (Euclidean or DTW) | minimize | Ates et al., 2021 |
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tscf-eval"
3
- version = "1.2.0"
3
+ version = "1.2.1"
4
4
  description = "TSCFEval - A model-agnostic framework for systematic evaluation of counterfactual explanations in time series classification"
5
5
  authors = [
6
6
  {name = "Bruna Zamith Santos", email = "bzs@cin.ufpe.br"},
@@ -296,7 +296,8 @@ class SETS(Counterfactual):
296
296
 
297
297
  parsed: list[ShapeletInfo] = []
298
298
  for i, shp in enumerate(transformer.shapelets):
299
- ig, length, start_pos, channel, series_id, class_val, z_norm = shp
299
+ # Newer aeon versions append a trailing distance-cache index; ignore it.
300
+ ig, length, start_pos, channel, series_id, class_val, z_norm = shp[:7]
300
301
  length = int(length)
301
302
  start_pos = int(start_pos)
302
303
  channel = int(channel)
File without changes
File without changes