Sliceline๏ƒ

Sliceline is a Python library for fast slice finding for Machine Learning model debugging.

It is an implementation of SliceLine: Fast, Linear-Algebra-based Slice Finding for ML Model Debugging, from Svetlana Sagadeeva and Matthias Boehm of Graz University of Technology.

๐Ÿ‘‰ Getting started๏ƒ

Given an input dataset X and a model error vector errors, SliceLine finds the top slices in X that identify where a ML model performs significantly worse.

You can use sliceline as follows:

from sliceline.slicefinder import Slicefinder

slice_finder = Slicefinder()

slice_finder.fit(X, errors)

print(slice_finder.top_slices_)

X_trans = slice_finder.transform(X)

We invite you to check the demo notebooks for a more thorough tutorial:

  1. Implementing Sliceline on Titanic dataset

  2. Binning template to apply Sliceline

๐Ÿ›  Installation๏ƒ

Sliceline is intended to work with Python 3.9 or above. Installation can be done with pip:

pip install sliceline

There are wheels available for Linux, MacOS, and Windows, which means that you most probably wonโ€™t have to build Sliceline from source.

You can install the latest development version from GitHub as so:

pip install git+https://github.com/datadome/sliceline --upgrade

Or, through SSH:

pip install git+ssh://git@github.com/datadome/sliceline.git --upgrade

๐Ÿ‘ Contributing๏ƒ

Feel free to contribute in any way you like, weโ€™re always open to new ideas and approaches.

  • Open a discussion if you have any question or enquiry whatsoever. Itโ€™s more useful to ask your question in public rather than sending us a private email. Itโ€™s also encouraged to open a discussion before contributing, so that everyone is aligned and unnecessary work is avoided.

  • Feel welcome to open an issue if you think youโ€™ve spotted a bug or a performance issue.

Please check out the contribution guidelines if you want to bring modifications to the code base.