Skip to content

Commit

Permalink
Add PyPI installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Björklund authored and Aggrathon committed Aug 15, 2021
1 parent 1bf03b6 commit 3d81fe6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 28 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ SLISE can also be used to provide *local model-agnostic explanations* for outcom
## Installation

To install this package just run:

```sh
pip install slise
```

Or install the latest version directly from GitHub with:

```sh
pip install https://github.com/edahelsinki/pyslise
```
Alternatively you can download the repo and run `python -m build` to build a wheel or `pip install .` to install locally.

Alternatively you can download the repo and run `python -m build` to build a wheel, or `pip install .` to install it locally.

### Other Languages

Expand Down
7 changes: 3 additions & 4 deletions examples/0_robust_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@
"source": [
"## Prerequisites\n",
"\n",
"The examples in this notebook assumes that SLISE is installed, which can be done with:\n",
"```sh\n",
"pip install https://github.com/edahelsinki/pyslise\n",
"```"
"- SLISE (for explanations)\n",
"- NumPy (for numerical operations)\n",
"- Matplotlib (for plots)"
],
"cell_type": "markdown",
"metadata": {}
Expand Down
15 changes: 7 additions & 8 deletions examples/1_tabular_explanation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@
"source": [
"## Prerequisites\n",
"\n",
"The example in this notebook assumes that SLISE is installed, which can be done with:\n",
"```sh\n",
"pip install https://github.com/edahelsinki/pyslise\n",
"```\n",
"We also need Keras (Tensorflow) for the neural network:"
"- SLISE (for explanations)\n",
"- NumPy (for numerical operations)\n",
"- Matplotlib (for plots)\n",
"- TensorFlow (for the neural network and data loading)"
],
"cell_type": "markdown",
"metadata": {}
Expand All @@ -52,10 +51,10 @@
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"from tensorflow import keras\n",
"import slise\n",
"from matplotlib import pyplot as plt"
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"from tensorflow import keras"
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions examples/2_imbd_explanation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"## Prerequisites\n",
"\n",
"- SLISE (for explanations)\n",
"- numpy (for numerical operations)\n",
"- matplotlib (for plots)\n",
"- wordcloud (for plots)\n",
"- nltk (for text pre-processing)\n",
"- tensorflow (for keras, neural networks, and data loading)"
"- NumPy (for numerical operations)\n",
"- Matplotlib (for plots)\n",
"- WordCloud (for plots)\n",
"- Natural Language Toolkit (for text pre-processing)\n",
"- TensorFlow (for the neural network and data loading)"
],
"cell_type": "markdown",
"metadata": {}
Expand All @@ -51,15 +51,15 @@
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"from tensorflow import keras\n",
"import slise\n",
"from slise.plot import SLISE_COLORMAP, SLISE_ORANGE, SLISE_PURPLE\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"from matplotlib.patches import Patch\n",
"from wordcloud import WordCloud\n",
"from nltk import PorterStemmer, download as nltk_download\n",
"from nltk.corpus import stopwords\n",
"from tensorflow import keras\n",
"\n",
"plt.rcParams['figure.figsize'] = [10, 6]\n",
"try:\n",
Expand Down
14 changes: 6 additions & 8 deletions examples/3_mnist_explanation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@
"source": [
"## Prerequisites\n",
"\n",
"The example in this notebook assumes that SLISE is installed, which can be done with:\n",
"```sh\n",
"pip install https://github.com/edahelsinki/pyslise\n",
"```\n",
"We also need Keras (Tensorflow) for the neural network (and data):"
"- SLISE (for explanations)\n",
"- NumPy (for numerical operations)\n",
"- Matplotlib (for plots)\n",
"- TensorFlow (for the neural network and data loading)"
],
"cell_type": "markdown",
"metadata": {}
Expand All @@ -58,12 +57,11 @@
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"from tensorflow import keras\n",
"import slise\n",
"from slise.plot import BW_COLORMAP\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"from scipy.stats import gaussian_kde\n",
"from tensorflow import keras\n",
"\n",
"plt.rcParams['figure.figsize'] = [10, 6]"
]
Expand Down

0 comments on commit 3d81fe6

Please sign in to comment.