Skip to content

Commit 14ef246

Browse files
authored
Merge pull request #1 from edahelsinki/update
Update
2 parents 3d81fe6 + 02cadda commit 14ef246

16 files changed

+1282
-725
lines changed

.github/workflows/python-publish.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
jobs:
16+
deploy:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: '3.x'
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build
30+
- name: Build package
31+
run: python -m build
32+
- name: Publish package
33+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
34+
with:
35+
user: __token__
36+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/python-pytest.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ["3.8", "3.9", "3.10"]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install pytest
30+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31+
- name: Test with pytest
32+
run: |
33+
pytest

CITATIONS.bib

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@article{bjorklund2022robust,
2+
title = {Robust regression via error tolerance},
3+
author = {Bj{\"o}rklund, Anton and Henelius, Andreas and Oikarinen, Emilia and Kallonen, Kimmo and Puolam{\"a}ki, Kai},
4+
year = {2022},
5+
month = jan,
6+
journal = {Data Mining and Knowledge Discovery},
7+
issn = {1384-5810, 1573-756X},
8+
doi = {10.1007/s10618-022-00819-2}
9+
}
10+
11+
@inproceedings{bjorklund2019sparse,
12+
title = {Sparse Robust Regression for Explaining Classifiers},
13+
booktitle = {Discovery Science},
14+
author = {Bj{\"o}rklund, Anton and Henelius, Andreas and Oikarinen, Emilia and Kallonen, Kimmo and Puolam{\"a}ki, Kai},
15+
year = {2019},
16+
series = {Lecture Notes in Computer Science},
17+
volume = {11828},
18+
pages = {351--366},
19+
publisher = {Springer International Publishing},
20+
doi = {10.1007/978-3-030-33778-0_27},
21+
isbn = {978-3-030-33777-3 978-3-030-33778-0}
22+
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Aggrathon
3+
Copyright (c) 2022 Anton Björklund
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
![Example of Robust Regression](examples/pyslise_banner.png)
1+
![PySLISE Banner Image](examples/pyslise_banner.png)
22
# SLISE - Sparse Linear Subset Explanations
33

4-
Python implementation of the SLISE algorithm. The SLISE algorithm can be used for
5-
both robust regression and to explain outcomes from black box models.
6-
For more details see [the paper](https://rdcu.be/bVbda), alternatively for a more informal
7-
overview see [the presentation](https://github.com/edahelsinki/slise/raw/master/vignettes/presentation.pdf),
8-
or [the poster](https://github.com/edahelsinki/slise/raw/master/vignettes/poster.pdf).
4+
Python implementation of the SLISE algorithm. The SLISE algorithm can be used for both robust regression and to explain outcomes from black box models.
5+
For more details see [the original paper](https://rdcu.be/bVbda) or the [robust regression paper](https://rdcu.be/cFRHD).
6+
Alternatively for a more informal overview see [the presentation](https://github.com/edahelsinki/slise/raw/master/vignettes/presentation.pdf), or [the poster](https://github.com/edahelsinki/slise/raw/master/vignettes/poster.pdf).
97

10-
> **Björklund A., Henelius A., Oikarinen E., Kallonen K., Puolamäki K.**
11-
> *Sparse Robust Regression for Explaining Classifiers.*
8+
> *Björklund A., Henelius A., Oikarinen E., Kallonen K., Puolamäki K.* (2019)
9+
> **Sparse Robust Regression for Explaining Classifiers.**
1210
> Discovery Science (DS 2019).
1311
> Lecture Notes in Computer Science, vol 11828, Springer.
14-
> https://doi.org/10.1007/978-3-030-33778-0_27
12+
> https://doi.org/10.1007/978-3-030-33778-0_27
13+
14+
> *Björklund A., Henelius A., Oikarinen E., Kallonen K., Puolamäki K.* (2022).
15+
> **Robust regression via error tolerance.**
16+
> Data Mining and Knowledge Discovery.
17+
> https://doi.org/10.1007/s10618-022-00819-2
1518
1619
## The idea
1720

@@ -47,12 +50,12 @@ Here are two quick examples of SLISE in action. For more detailed examples, with
4750
> SLISE is a robust regression algorithm, which means that it is able to handle outliers. This is in contrast to, e.g., ordinary least-squares regression, which gives skewed results when outliers are present.
4851
4952
 
50-
> ![Example of Robust Regression](examples/ex2.png)
53+
> ![Example of Explanation](examples/ex2.png)
5154
> SLISE can also be used to explain outcomes from black box models by locally approximating the complex models with a simpler linear model.
5255
5356
## Dependencies
5457

55-
This implementation is requires Python 3 and the following packages:
58+
This implementation requires Python 3 and the following packages:
5659

5760
- matplotlib
5861
- numba

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
numpy>=1.19
22
scipy>=1.4
33
PyLBFGS>=0.2
4-
numba=>0.53
4+
numba>=0.53
55
matplotlib>=3.3

setup.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = slise
3-
version = 1.1.2
3+
version = 2.0.0
44
author = Anton Björklund
55
author_email = [email protected]
66
description = The SLISE algorithm for robust regression and explanations of black box models
@@ -19,6 +19,7 @@ keywords =
1919
Robust regression
2020
Sparse Linear Regression
2121
Explainable Artificial Intelligence
22+
Local Explanations
2223

2324
[options]
2425
packages = find:

0 commit comments

Comments
 (0)