sliceline 0.0.0__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/__init__.py +3 -0
- sliceline/slicefinder.py +732 -0
- sliceline/validation.py +858 -0
- sliceline-0.0.0.dist-info/LICENSE +29 -0
- sliceline-0.0.0.dist-info/METADATA +119 -0
- sliceline-0.0.0.dist-info/RECORD +7 -0
- sliceline-0.0.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022, the Sliceline developers
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: sliceline
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: ✂️ Fast slice finding for Machine Learning model debugging.
|
|
5
|
+
License: BSD-3-Clause
|
|
6
|
+
Author: Antoine de Daran
|
|
7
|
+
Requires-Python: >=3.10,<4
|
|
8
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Dist: numpy (>=1.25,<2.0)
|
|
15
|
+
Requires-Dist: scikit-learn (>=1.5.0,<2.0.0)
|
|
16
|
+
Requires-Dist: scipy (>=1.12,<2.0)
|
|
17
|
+
Project-URL: Documentation, https://sliceline.readthedocs.io/en/stable/
|
|
18
|
+
Project-URL: Repository, https://github.com/DataDome/sliceline
|
|
19
|
+
Description-Content-Type: text/x-rst
|
|
20
|
+
|
|
21
|
+
Sliceline
|
|
22
|
+
=========
|
|
23
|
+
|
|
24
|
+
Sliceline is a Python library for fast slice finding for Machine
|
|
25
|
+
Learning model debugging.
|
|
26
|
+
|
|
27
|
+
It is an implementation of `SliceLine: Fast, Linear-Algebra-based Slice
|
|
28
|
+
Finding for ML Model
|
|
29
|
+
Debugging <https://mboehm7.github.io/resources/sigmod2021b_sliceline.pdf>`__,
|
|
30
|
+
from Svetlana Sagadeeva and Matthias Boehm of Graz University of
|
|
31
|
+
Technology.
|
|
32
|
+
|
|
33
|
+
👉 Getting started
|
|
34
|
+
------------------
|
|
35
|
+
|
|
36
|
+
Given an input dataset ``X`` and a model error vector ``errors``,
|
|
37
|
+
SliceLine finds the top slices in ``X`` that identify where a ML model
|
|
38
|
+
performs significantly worse.
|
|
39
|
+
|
|
40
|
+
You can use sliceline as follows:
|
|
41
|
+
|
|
42
|
+
.. code:: python
|
|
43
|
+
|
|
44
|
+
from sliceline.slicefinder import Slicefinder
|
|
45
|
+
|
|
46
|
+
slice_finder = Slicefinder()
|
|
47
|
+
|
|
48
|
+
slice_finder.fit(X, errors)
|
|
49
|
+
|
|
50
|
+
print(slice_finder.top_slices_)
|
|
51
|
+
|
|
52
|
+
X_trans = slice_finder.transform(X)
|
|
53
|
+
|
|
54
|
+
We invite you to check the `demo
|
|
55
|
+
notebooks <https://github.com/DataDome/sliceline/blob/main/notebooks>`__
|
|
56
|
+
for a more thorough tutorial:
|
|
57
|
+
|
|
58
|
+
1. Implementing Sliceline on Titanic dataset
|
|
59
|
+
2. Implementing Sliceline on California housing dataset
|
|
60
|
+
|
|
61
|
+
🛠 Installation
|
|
62
|
+
---------------
|
|
63
|
+
|
|
64
|
+
Sliceline is intended to work with **Python 3.10 or above**. Installation
|
|
65
|
+
can be done with ``pip``:
|
|
66
|
+
|
|
67
|
+
.. code:: sh
|
|
68
|
+
|
|
69
|
+
pip install sliceline
|
|
70
|
+
|
|
71
|
+
There are `wheels
|
|
72
|
+
available <https://pypi.org/project/sliceline/#files>`__ for Linux,
|
|
73
|
+
MacOS, and Windows, which means that you most probably won’t have to
|
|
74
|
+
build Sliceline from source.
|
|
75
|
+
|
|
76
|
+
You can install the latest development version from GitHub as so:
|
|
77
|
+
|
|
78
|
+
.. code:: sh
|
|
79
|
+
|
|
80
|
+
pip install git+https://github.com/DataDome/sliceline --upgrade
|
|
81
|
+
|
|
82
|
+
Or, through SSH:
|
|
83
|
+
|
|
84
|
+
.. code:: sh
|
|
85
|
+
|
|
86
|
+
pip install git+ssh://git@github.com/datadome/sliceline.git --upgrade
|
|
87
|
+
|
|
88
|
+
🔗 Useful links
|
|
89
|
+
---------------
|
|
90
|
+
|
|
91
|
+
- `Documentation <https://sliceline.readthedocs.io/en/stable/>`__
|
|
92
|
+
- `Package releases <https://pypi.org/project/sliceline/#history>`__
|
|
93
|
+
- `SliceLine paper <https://mboehm7.github.io/resources/sigmod2021b_sliceline.pdf>`__
|
|
94
|
+
|
|
95
|
+
👐 Contributing
|
|
96
|
+
---------------
|
|
97
|
+
|
|
98
|
+
Feel free to contribute in any way you like, we’re always open to new
|
|
99
|
+
ideas and approaches.
|
|
100
|
+
|
|
101
|
+
- `Open a
|
|
102
|
+
discussion <https://github.com/DataDome/sliceline/discussions/new>`__
|
|
103
|
+
if you have any question or enquiry whatsoever. It’s more useful to
|
|
104
|
+
ask your question in public rather than sending us a private email.
|
|
105
|
+
It’s also encouraged to open a discussion before contributing, so
|
|
106
|
+
that everyone is aligned and unnecessary work is avoided.
|
|
107
|
+
- Feel welcome to `open an
|
|
108
|
+
issue <https://github.com/DataDome/sliceline/issues/new/choose>`__ if
|
|
109
|
+
you think you’ve spotted a bug or a performance issue.
|
|
110
|
+
|
|
111
|
+
Please check out the `contribution
|
|
112
|
+
guidelines <https://github.com/DataDome/sliceline/blob/main/CONTRIBUTING.md>`__
|
|
113
|
+
if you want to bring modifications to the code base.
|
|
114
|
+
|
|
115
|
+
📝 License
|
|
116
|
+
----------
|
|
117
|
+
|
|
118
|
+
Sliceline is free and open-source software licensed under the `3-clause BSD license <https://github.com/DataDome/sliceline/blob/main/LICENSE>`__.
|
|
119
|
+
|
|
@@ -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.0.0.dist-info/LICENSE,sha256=AbeN2ySrCt8VUJukqcQIYutROwZh3W2u0UU1d7EnbZs,1531
|
|
5
|
+
sliceline-0.0.0.dist-info/METADATA,sha256=cdy4GOO99qMsQEX_CXx626Y79q3F_Fmw7AojyigkP2c,3716
|
|
6
|
+
sliceline-0.0.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
7
|
+
sliceline-0.0.0.dist-info/RECORD,,
|