sliceline 0.2.15__py3-none-any.whl → 0.2.18__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.
sliceline/slicefinder.py CHANGED
@@ -26,6 +26,7 @@ class Slicefinder(BaseEstimator, TransformerMixin):
26
26
  Given an input dataset (`X`) and a model error vector (`errors`), SliceLine finds
27
27
  the `k` slices in `X` that identify where the model performs significantly worse.
28
28
  A slice is a subspace of `X` defined by one or more predicates.
29
+
29
30
  The maximal dimension of this subspace is controlled by `max_l`.
30
31
 
31
32
  The slice scoring function is the linear combination of two objectives:
@@ -33,6 +34,7 @@ class Slicefinder(BaseEstimator, TransformerMixin):
33
34
  (high impact on the overall model)
34
35
  - With substantial errors
35
36
  (high negative impact on sub-group/model)
37
+
36
38
  The importance of each objective is controlled through a single parameter `alpha`.
37
39
 
38
40
  Slice enumeration and pruning techniques are done via sparse linear algebra.
@@ -54,31 +56,30 @@ class Slicefinder(BaseEstimator, TransformerMixin):
54
56
  In other words: the maximum number of predicate to define a slice.
55
57
 
56
58
  min_sup: int or float, default=10
57
- Minimum support threshold.
58
- Inspired by frequent itemset mining, it ensures statistical significance.
59
- If `min_sup` is a float (0 < `min_sup` < 1),
60
- it represents the faction of the input dataset (`X`).
59
+ Minimum support threshold. Inspired by frequent itemset mining,
60
+ it ensures statistical significance. If `min_sup` is a float (0 < `min_sup` < 1),
61
+ it represents the faction of the input dataset (`X`).
61
62
 
62
63
  verbose: bool, default=True
63
64
  Controls the verbosity.
64
65
 
65
66
  Attributes
66
67
  ----------
67
- top_slices_: np.ndarray of shape (_n_features_out, number of columns of the input dataset)
68
+ top_slices: np.ndarray of shape (_n_features_out, number of columns of the input dataset)
68
69
  The `_n_features_out` slices with the highest score.
69
70
  `None` values in slices represent unused column in the slice.
70
71
 
71
- average_error_: float
72
+ average_error: float
72
73
  Mean value of the input error.
73
74
 
74
- top_slices_statistics_: list of dict of length `len(top_slices_)`
75
+ top_slices_statistics: list of dict of length `len(top_slices_)`
75
76
  The statistics of the slices found sorted by slice's scores.
76
77
  For each slice, the following statistics are stored:
77
- - slice_score: the score of the slice (defined in `_score` method)
78
- - sum_slice_error: the sum of all the errors in the slice
79
- - max_slice_error: the maximum of all errors in the slice
80
- - slice_size: the number of elements in the slice
81
- - slice_average_error: the average error in the slice (sum_slice_error / slice_size)
78
+ - slice_score: the score of the slice (defined in `_score` method)
79
+ - sum_slice_error: the sum of all the errors in the slice
80
+ - max_slice_error: the maximum of all errors in the slice
81
+ - slice_size: the number of elements in the slice
82
+ - slice_average_error: the average error in the slice (sum_slice_error / slice_size)
82
83
 
83
84
  References
84
85
  ----------
@@ -1,16 +1,16 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: sliceline
3
- Version: 0.2.15
3
+ Version: 0.2.18
4
4
  Summary: ✂️ Fast slice finding for Machine Learning model debugging.
5
- Home-page: https://github.com/DataDome/sliceline
6
5
  License: BSD-3-Clause
7
6
  Author: Antoine de Daran
8
- Requires-Python: >=3.9,<3.12
7
+ Requires-Python: >=3.10,<4
9
8
  Classifier: License :: OSI Approved :: BSD License
10
9
  Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
10
  Classifier: Programming Language :: Python :: 3.10
13
11
  Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
14
  Requires-Dist: numpy (>=1.25,<2.0)
15
15
  Requires-Dist: scikit-learn (>=1.5.0,<2.0.0)
16
16
  Requires-Dist: scipy (>=1.12,<2.0)
@@ -61,7 +61,7 @@ for a more thorough tutorial:
61
61
  🛠 Installation
62
62
  ---------------
63
63
 
64
- Sliceline is intended to work with **Python 3.9 or above**. Installation
64
+ Sliceline is intended to work with **Python 3.10 or above**. Installation
65
65
  can be done with ``pip``:
66
66
 
67
67
  .. code:: sh
@@ -0,0 +1,7 @@
1
+ sliceline/__init__.py,sha256=jEIUmQtv4W_eZuH63KQ8tAFoRZxyN3O8bRZ__FlMJr0,65
2
+ sliceline/slicefinder.py,sha256=xuGsxGXtihkKNEokRmhycJ6aY-FPkkNjCsPQKTcPABg,26355
3
+ sliceline/validation.py,sha256=-RkCpRdANNeaJyrdj7zFn4xs1X1xIXitKwRoL_B5EAk,30794
4
+ sliceline-0.2.18.dist-info/LICENSE,sha256=AbeN2ySrCt8VUJukqcQIYutROwZh3W2u0UU1d7EnbZs,1531
5
+ sliceline-0.2.18.dist-info/METADATA,sha256=JiKzXGFQfX7pOMhuhafNrtKxB57yTK7z91CySd3MD7I,3717
6
+ sliceline-0.2.18.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
7
+ sliceline-0.2.18.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 2.1.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,7 +0,0 @@
1
- sliceline/__init__.py,sha256=jEIUmQtv4W_eZuH63KQ8tAFoRZxyN3O8bRZ__FlMJr0,65
2
- sliceline/slicefinder.py,sha256=eC_WiVVxoUh1idFfqG23J1VRYbpWNn8brULzLXcrT-A,26388
3
- sliceline/validation.py,sha256=-RkCpRdANNeaJyrdj7zFn4xs1X1xIXitKwRoL_B5EAk,30794
4
- sliceline-0.2.15.dist-info/LICENSE,sha256=AbeN2ySrCt8VUJukqcQIYutROwZh3W2u0UU1d7EnbZs,1531
5
- sliceline-0.2.15.dist-info/METADATA,sha256=G5uG6UOyzFg-jkuzzx-zQhdNX9-GLkhx158V6Sg1lSA,3715
6
- sliceline-0.2.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
7
- sliceline-0.2.15.dist-info/RECORD,,