From 32e6b1342039fdc9c3e4d914f0843e128e19e2e8 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Thu, 27 May 2021 18:05:02 +0200
Subject: [PATCH 01/20] update extras require
---
setup.py | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/setup.py b/setup.py
index eb73b658..679985ee 100644
--- a/setup.py
+++ b/setup.py
@@ -22,18 +22,32 @@
'dash-table==4.11.0',
'nbformat>4.2.0',
'numba==0.51.2',
- 'nbconvert==6.0.7',
- 'papermill==2.3.2',
- 'matplotlib>=3.0',
- 'seaborn==0.11.1'
+ 'scikit-learn'
]
+extras = dict()
+
+# This list should be identical to the list in shapash/report/__init__.py
+extras['report'] = [
+ 'nbconvert==6.0.7',
+ 'papermill',
+ 'matplotlib',
+ 'seaborn',
+ 'notebook',
+ 'Jinja2'
+]
+
+extras['xgboost'] = ['xgboost>=1.0.0']
+extras['lightgbm'] = ['lightgbm>=2.3.0']
+extras['catboost'] = ['catboost>=0.21']
+extras['scikit-learn'] = ['scikit-learn>=0.23.0']
+
setup_requirements = ['pytest-runner', ]
test_requirements = ['pytest', ]
setup(
- name="shapash", # Replace with your own username
+ name="shapash",
version="1.3.2",
python_requires='>3.5, < 3.9',
url='https://github.com/MAIF/shapash',
@@ -51,6 +65,7 @@
"Operating System :: OS Independent",
],
install_requires=requirements,
+ extras_require=extras,
license="Apache Software License 2.0",
keywords='shapash',
package_dir={
From a7924ff4e31ce67b81fcfbbff2c47705908340d1 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Thu, 27 May 2021 18:07:28 +0200
Subject: [PATCH 02/20] update dev requirements for Shapash report
---
requirements.dev.txt | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/requirements.dev.txt b/requirements.dev.txt
index c661730f..e3ba7666 100644
--- a/requirements.dev.txt
+++ b/requirements.dev.txt
@@ -28,7 +28,8 @@ xgboost==1.0.0
nbformat>4.2.0
numba==0.51.2
nbconvert==6.0.7
-papermill==2.3.2
-matplotlib==3.3.4
-seaborn==0.11.1
-jupyter==1.0.0
+papermill
+matplotlib
+seaborn
+notebook
+Jinja2
From 76286fb56e6d7c1463e2e4753fb1bdc8d5c9ede4 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Thu, 27 May 2021 18:08:19 +0200
Subject: [PATCH 03/20] update Shapash report requirements instructions
---
README.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README.md b/README.md
index 27728d75..8b173512 100644
--- a/README.md
+++ b/README.md
@@ -123,6 +123,12 @@ Shapash is intended to work with Python versions 3.6 to 3.8. Installation can be
pip install shapash
```
+In order to generate the Shapash Report some extra requirements are needed.
+You can install these using the following command :
+```
+pip install shapash[report]
+```
+
## 🕐 Quickstart
The 4 steps to display results:
From 99fcbce5448cf042b5ef50b2855f37bdd6025da8 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Thu, 27 May 2021 18:09:12 +0200
Subject: [PATCH 04/20] check non necessary pyyaml import
---
shapash/utils/io.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/shapash/utils/io.py b/shapash/utils/io.py
index 57cf8357..51168c75 100644
--- a/shapash/utils/io.py
+++ b/shapash/utils/io.py
@@ -2,7 +2,12 @@
IO module
"""
import pickle
-import yaml
+try:
+ import yaml
+ _is_yaml_available = True
+except (ImportError, ModuleNotFoundError):
+ _is_yaml_available = False
+
def save_pickle(obj, path, protocol=pickle.HIGHEST_PROTOCOL):
"""
@@ -72,6 +77,9 @@ def load_yml(path):
d : dict
Python dict containing the parsed yml file.
"""
+ if _is_yaml_available is False:
+ raise ModuleNotFoundError('Please install PyYAML using "pip install pyyaml" command.')
+
if not isinstance(path, str):
raise ValueError(
"""
From 83b35a008deecce755e436ae7e680d829a666c33 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Thu, 27 May 2021 18:10:13 +0200
Subject: [PATCH 05/20] add checks to make sure all required libraries are
installed for generating Shapash report
---
shapash/explainer/smart_explainer.py | 6 ++++-
shapash/report/__init__.py | 25 +++++++++++++++++++
.../explainer/test_smart_explainer.py | 4 +--
3 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/shapash/explainer/smart_explainer.py b/shapash/explainer/smart_explainer.py
index 6aa24b4e..2e7865a4 100644
--- a/shapash/explainer/smart_explainer.py
+++ b/shapash/explainer/smart_explainer.py
@@ -17,7 +17,7 @@
from shapash.utils.check import check_model, check_label_dict, check_ypred, check_contribution_object,\
check_postprocessing, check_features_name
from shapash.manipulation.select_lines import keep_right_contributions
-from shapash.report.generation import execute_report, export_and_save_report
+from shapash.report import check_report_requirements
from .smart_state import SmartState
from .multi_decorator import MultiDecorator
from .smart_plotter import SmartPlotter
@@ -1125,6 +1125,10 @@ def generate_report(self,
]
)
"""
+ check_report_requirements()
+ # Avoid Import Errors with requirements specific to the Shapash Report
+ from shapash.report.generation import execute_report, export_and_save_report
+
rm_working_dir = False
if not working_dir:
working_dir = tempfile.mkdtemp()
diff --git a/shapash/report/__init__.py b/shapash/report/__init__.py
index e69de29b..09af927f 100644
--- a/shapash/report/__init__.py
+++ b/shapash/report/__init__.py
@@ -0,0 +1,25 @@
+import importlib
+
+# This list should be identical to the list in setup.py
+report_requirements = [
+ 'nbconvert==6.0.7',
+ 'papermill',
+ 'matplotlib',
+ 'seaborn',
+ 'notebook',
+ 'Jinja2'
+]
+
+
+def check_report_requirements():
+ """
+ Checks that all required packages for the report are installed.
+ This function should be called before executing the report.
+ """
+ for req in report_requirements:
+ pkg = req.split('=')[0]
+ try:
+ importlib.import_module(pkg.lower())
+ except (ModuleNotFoundError, ImportError):
+ raise ModuleNotFoundError(f"The following package is necessary to generate the Shapash Report : {pkg}. "
+ f"Try 'pip install shapash[report]' to install all required packages.")
\ No newline at end of file
diff --git a/tests/unit_tests/explainer/test_smart_explainer.py b/tests/unit_tests/explainer/test_smart_explainer.py
index 7b88d8ae..a69ddb57 100644
--- a/tests/unit_tests/explainer/test_smart_explainer.py
+++ b/tests/unit_tests/explainer/test_smart_explainer.py
@@ -1302,8 +1302,8 @@ def test_run_app_1(self, mock_get_host_name, mock_custom_thread, mock_smartapp):
assert xpl.y_pred is not None
- @patch('shapash.explainer.smart_explainer.export_and_save_report')
- @patch('shapash.explainer.smart_explainer.execute_report')
+ @patch('shapash.report.generation.export_and_save_report')
+ @patch('shapash.report.generation.execute_report')
def test_generate_report(self, mock_execute_report, mock_export_and_save_report):
"""
Test generate report method
From 50fa725692c5fba41d60483a3460b52541bd7c58 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Tue, 1 Jun 2021 13:47:12 +0200
Subject: [PATCH 06/20] fix get_interaction_values test for newer versions of
shap
---
tests/unit_tests/explainer/test_smart_explainer.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/unit_tests/explainer/test_smart_explainer.py b/tests/unit_tests/explainer/test_smart_explainer.py
index a69ddb57..458e3ab4 100644
--- a/tests/unit_tests/explainer/test_smart_explainer.py
+++ b/tests/unit_tests/explainer/test_smart_explainer.py
@@ -11,6 +11,7 @@
import numpy as np
import catboost as cb
from sklearn.linear_model import LinearRegression
+from sklearn.ensemble import RandomForestClassifier
from shapash.explainer.smart_explainer import SmartExplainer
from shapash.explainer.multi_decorator import MultiDecorator
from shapash.explainer.smart_state import SmartState
@@ -1266,12 +1267,12 @@ def test_to_smartpredictor_1(self):
def test_get_interaction_values_1(self):
df = pd.DataFrame({
- "y": np.random.randint(2, size=50),
- "a": np.random.rand(50),
- "b": np.random.rand(50),
+ "y": np.random.randint(2, size=10),
+ "a": np.random.rand(10)*10,
+ "b": np.random.rand(10),
})
- clf = cb.CatBoostClassifier(n_estimators=1).fit(df[['a', 'b']], df['y'])
+ clf = RandomForestClassifier(n_estimators=5).fit(df[['a', 'b']], df['y'])
xpl = SmartExplainer()
xpl.compile(x=df.drop('y', axis=1), model=clf)
From 4f2045071f6d65cc7ae13afc6fdcfe3c1cd3562f Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Tue, 1 Jun 2021 13:59:18 +0200
Subject: [PATCH 07/20] add category_encoders in extras require
---
setup.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.py b/setup.py
index 679985ee..cdf8fa07 100644
--- a/setup.py
+++ b/setup.py
@@ -41,6 +41,7 @@
extras['lightgbm'] = ['lightgbm>=2.3.0']
extras['catboost'] = ['catboost>=0.21']
extras['scikit-learn'] = ['scikit-learn>=0.23.0']
+extras['category_encoders'] = ['category_encoders==2.2.2']
setup_requirements = ['pytest-runner', ]
From 0adc02054f7653689a30ec311b30b322a5378b04 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Tue, 1 Jun 2021 15:08:32 +0200
Subject: [PATCH 08/20] modify shap version
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index cdf8fa07..83e7f2f3 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@
'plotly==4.12.0',
'numpy>1.18.0',
'pandas>1.0.2',
- 'shap==0.37.0',
+ 'shap>=0.36.0',
'dash==1.17.0',
'dash-bootstrap-components==0.9.1',
'dash-core-components==1.13.0',
From 96625160d8c9a812d4d800f90260ee865fc74e9e Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Tue, 1 Jun 2021 16:10:36 +0200
Subject: [PATCH 09/20] =?UTF-8?q?=F0=9F=8E=89=20add=20shapash=20compatibil?=
=?UTF-8?q?ity=20with=20python=20version=203.9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/main.yml | 2 +-
requirements.dev.txt | 6 +++---
setup.py | 2 +-
tests/data/predictor_to_load_39.pkl | Bin 0 -> 9181 bytes
.../unit_tests/utils/test_load_smartpredictor.py | 4 ++++
5 files changed, 9 insertions(+), 5 deletions(-)
create mode 100644 tests/data/predictor_to_load_39.pkl
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8768ef28..17d3c9e1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
- python-version: [3.6, 3.7, 3.8]
+ python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
diff --git a/requirements.dev.txt b/requirements.dev.txt
index e3ba7666..32507e0a 100644
--- a/requirements.dev.txt
+++ b/requirements.dev.txt
@@ -1,6 +1,6 @@
pip==20.2.4
dash==1.17.0
-catboost==0.22
+catboost>=0.22
category-encoders==2.1.0
dash-bootstrap-components==0.9.1
dash-core-components==1.13.0
@@ -23,10 +23,10 @@ sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
pytest==5.2.3
pytest-cov==2.8.1
-scikit-learn==0.23.2
+scikit-learn>=0.23.2
xgboost==1.0.0
nbformat>4.2.0
-numba==0.51.2
+numba==0.53.1
nbconvert==6.0.7
papermill
matplotlib
diff --git a/setup.py b/setup.py
index 83e7f2f3..439c8520 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@
'dash-renderer==1.8.3',
'dash-table==4.11.0',
'nbformat>4.2.0',
- 'numba==0.51.2',
+ 'numba==0.53.1',
'scikit-learn'
]
diff --git a/tests/data/predictor_to_load_39.pkl b/tests/data/predictor_to_load_39.pkl
new file mode 100644
index 0000000000000000000000000000000000000000..156ed1bc7afe25491b5afd48e381b5656b582407
GIT binary patch
literal 9181
zcmeHNPi)*)dZ%pJk!9KII1Z8kISjY~>J*yMa5S2cW`kW@vXi*7wT5M9+jU*;8}f0;
zh(mJuN7BS~kpkT$1$Zb>Zm$K3MS;Ebx_fDlJ@-`Xp_g6?w1++Pv^}`L?|USNQtTwf
z_EMlUo;iGfzW2TF|Mxw8dhVzH^lgowXT|mW+%&YMU*wl8k&eSKNjp{;%ObzJBhqd9
z-tk3}c#bFI;xCJL|Fob*D}gDK)SHSljFVz_A%Dd*6`bw+Z)w`j_C4c6ysz*s%Xlwp
zOWKOIjPL7c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(pic^V(F-W7J~g)9qp?NGzKgwlg|qOf$E9z4zd`qwGpb)h
z)9jL%2=9a*tFU$uOqzx%eXYHKC~)ZgiXj_-@z
zbNNMrpiV_g-F{P?PmATk?%9gn?#<@J({kUO_^K(6cOd@qgpYa_*(!Cx
z8cPm}Aam~D=5Lx=5P8-Cl6P~5$M5r(jp6M#K=@A=f4WlAKYy(O7-<2n(qkyYB@`QO
zc_>n(7NSM0qrWFu%#dpr`8(sm(Aw$_MBD1gZrd>AxV_bLthTUh+22HU%;@!s{FP|N
zWwDpy{whjGjCEZ-!#>w{7k3uLrAy1j&M*G8A{)_`epA~)ONiiqtnF*>F8t>0*3DKB
zwh^Hcp;}cTuEXKc&$XW~{A%Giro-}ozxn(&?NqJ3?z~sT%cMJmugo_L@z*7`1dI!{-^Irg{$2#tnL`@DYTRXqa3kKh
X*aNoow
Date: Tue, 1 Jun 2021 16:17:51 +0200
Subject: [PATCH 10/20] update compatible python versions in readme
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 8b173512..d1e3b969 100644
--- a/README.md
+++ b/README.md
@@ -117,7 +117,7 @@ to compute contributions.
## 🛠 Installation
-Shapash is intended to work with Python versions 3.6 to 3.8. Installation can be done with pip:
+Shapash is intended to work with Python versions 3.6 to 3.9. Installation can be done with pip:
```
pip install shapash
From c2a30224f1d083f487b18cf797b4f75857f1fc8f Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Fri, 4 Jun 2021 14:59:00 +0200
Subject: [PATCH 11/20] add python 3.9 to python_requires
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 439c8520..1bbc0e21 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,7 @@
setup(
name="shapash",
version="1.3.2",
- python_requires='>3.5, < 3.9',
+ python_requires='>3.5, <=3.9',
url='https://github.com/MAIF/shapash',
author="Yann Golhen, Sebastien Bidault, Yann Lagre, Maxime Gendre",
author_email="yann.golhen@maif.fr",
From fbe4b22eb2da6cc2771949fc6a368bfcdfa4bb70 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Fri, 4 Jun 2021 17:26:10 +0200
Subject: [PATCH 12/20] add phik to requirements list
---
requirements.dev.txt | 1 +
setup.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/requirements.dev.txt b/requirements.dev.txt
index 32507e0a..456120b4 100644
--- a/requirements.dev.txt
+++ b/requirements.dev.txt
@@ -33,3 +33,4 @@ matplotlib
seaborn
notebook
Jinja2
+phik
diff --git a/setup.py b/setup.py
index 1bbc0e21..f37bd0c3 100644
--- a/setup.py
+++ b/setup.py
@@ -34,7 +34,8 @@
'matplotlib',
'seaborn',
'notebook',
- 'Jinja2'
+ 'Jinja2',
+ 'phik'
]
extras['xgboost'] = ['xgboost>=1.0.0']
From 7a3e053ebf110395da57c0efebc7cd415fea3c9f Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Mon, 7 Jun 2021 11:45:19 +0200
Subject: [PATCH 13/20] add extras require instructions to readme and doc
---
README.md | 2 ++
docs/installation-instructions/index.rst | 31 +++++++++++++++++++++++-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d1e3b969..35c432da 100644
--- a/README.md
+++ b/README.md
@@ -129,6 +129,8 @@ You can install these using the following command :
pip install shapash[report]
```
+If you encounter **compatibility issues** you may check the corresponding section in the Shapash documentation [here](https://shapash.readthedocs.io/en/latest/installation-instructions/index.html).
+
## 🕐 Quickstart
The 4 steps to display results:
diff --git a/docs/installation-instructions/index.rst b/docs/installation-instructions/index.rst
index 2f75b3cb..668b7bb8 100644
--- a/docs/installation-instructions/index.rst
+++ b/docs/installation-instructions/index.rst
@@ -4,12 +4,20 @@ Installation instructions
Installing
----------
-Users can install **Shapash** with pip:
+**Shapash** is intended to work with Python versions 3.6 to 3.9. Installation can be done with pip:
.. code:: bash
pip install shapash
+
+In order to generate the **Shapash Report** you may need to install specific libraries.
+You can install these using the following command :
+
+.. code:: bash
+
+ pip install shapash[report]
+
Jupyter
-------
@@ -213,3 +221,24 @@ To test if plotly works:
.. image:: plotly.png
+
+Compatibility issues
+--------------------
+
+When using Shapash, you may encounter some compatibility issues related to your environment and the libraries' versions used.
+The extras requirements of Shapash allow you to update your requirements to a compatible version.
+
+For example, if you get an error related to the *xgboost* library, you can use the following command to update it to a working version :
+
+.. code:: bash
+
+ pip install shapash[xgboost]
+
+The full list of extras requirements is listed below (replace xgboost with the corresponding library on the command above) :
+
+* xgboost
+* lightgbm
+* catboost
+* scikit-learn
+* category_encoders
+
From 2b4150aab34f22767cee610e64dd4c94e5371002 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Tue, 8 Jun 2021 09:53:24 +0200
Subject: [PATCH 14/20] add correlation plot in grid images
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 35c432da..d6d73c29 100644
--- a/README.md
+++ b/README.md
@@ -66,9 +66,9 @@ Shapash also contributes to data science auditing by displaying usefull informat
-
+
-
+
From 140abcd167de25a4ef1b72d94ae3965965e4735a Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Tue, 8 Jun 2021 10:01:50 +0200
Subject: [PATCH 15/20] add tutorial for groups of features in readme
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d6d73c29..c85001b0 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@
-🎉 **We just released Shapash 1.3.2 that includes the generation of a standalone HTML report that constitutes a basis of an audit document. [See an example here](https://shapash.readthedocs.io/en/latest/report.html) that was generated [using this tutorial.](https://github.com/MAIF/shapash/blob/master/tutorial/report/tuto-shapash-report01.ipynb)** 🎉
+🎉 **We just released Shapash 1.4.0 that includes the option to group features that share common properties together [See the tutorial here](https://shapash.readthedocs.io/en/latest/tutorials/tuto-common01-groups_of_features.html).** 🎉
## 🔍 Overview
@@ -203,6 +203,7 @@ This github repository offers a lot of tutorials to allow you to start more conc
- [Launch the webapp with a concrete use case](tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb)
- [Jupyter Overviews - The main outputs and methods available with the SmartExplainer object](tutorial/tutorial02-Shapash-overview-in-Jupyter.ipynb)
- [Shapash in production: From model training to deployment (API or Batch Mode)](tutorial/tutorial03-Shapash-overview-model-in-production.ipynb)
+- [Use groups of features](https://shapash.readthedocs.io/en/latest/tutorials/tuto-common01-groups_of_features.html)
### More details about charts and plots
- [**Shapash** Features Importance](tutorial/plot/tuto-plot03-features-importance.ipynb)
From f9e7223396ca9d4f0d59edcb4703dfd8dfc0772d Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Mon, 14 Jun 2021 14:17:42 +0200
Subject: [PATCH 16/20] minor change in readme
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c85001b0..efbd6c74 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@
-🎉 **We just released Shapash 1.4.0 that includes the option to group features that share common properties together [See the tutorial here](https://shapash.readthedocs.io/en/latest/tutorials/tuto-common01-groups_of_features.html).** 🎉
+🎉 **We just released Shapash 1.4.0 that includes the option to group features that share common properties together. This option can be useful if your model has a lot of features. [See the tutorial here](https://shapash.readthedocs.io/en/latest/tutorials/tuto-common01-groups_of_features.html).** 🎉
## 🔍 Overview
From 592b70f15a58fc7dc0731528dfe56d5acef0b4f8 Mon Sep 17 00:00:00 2001
From: Thibaud
Date: Mon, 14 Jun 2021 16:09:51 +0200
Subject: [PATCH 17/20] add groups of features button gif
---
README.md | 7 ++++++-
docs/_static/groups_features.gif | Bin 0 -> 9009 bytes
2 files changed, 6 insertions(+), 1 deletion(-)
create mode 100644 docs/_static/groups_features.gif
diff --git a/README.md b/README.md
index efbd6c74..dd0fd56b 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,12 @@
-🎉 **We just released Shapash 1.4.0 that includes the option to group features that share common properties together. This option can be useful if your model has a lot of features. [See the tutorial here](https://shapash.readthedocs.io/en/latest/tutorials/tuto-common01-groups_of_features.html).** 🎉
+🎉
+**We just released Shapash 1.4.0 that includes the option to group features that share common properties together.
+This option can be useful if your model has a lot of features. [See the tutorial here](https://shapash.readthedocs.io/en/latest/tutorials/tuto-common01-groups_of_features.html).**
+
+
+
## 🔍 Overview
diff --git a/docs/_static/groups_features.gif b/docs/_static/groups_features.gif
new file mode 100644
index 0000000000000000000000000000000000000000..2955fd1f6c11a333434bc7b14335cda22941afc4
GIT binary patch
literal 9009
zcmeHsX;4#X*X_y4JOD`u5JrEe`!UwB3C4SKoWzx4yb{>)xvS@7{C%o#)iq_3X3v
zUh7$FRVd%bH%SCgfR6wGECC=0)yH8Ci6k=F)ZEO>!otYH!qRGm1%*PTnj)xn?lc>F
znp1!cjbv*}wX=6{aCCHF1UOP5j`rq`F78e)ZcYqeXS$0sgXzrhbavy?87_1NgU)bw
zp#m-rL>Icf3&YukL3d%exG-E@7)%#8Uxq7_;p)a<(iu!w2Fugc2JY%Yab-BVGF)64
zuCA_hrY(X=H)AqvnG8CU!DO;nEQW)di>bRc;7-T8d$_uLczC!ud9qe`(e=IU0be&$
zUtd2zCosSb6%ZKsjXxvE&n$=&z;gzIgZX?d_U;pHcNFbO5FI=yKDe`>ps+CApfJa`FfaU2!9l4I
zDA{RLvddm}_;9Ht{zxXOTwY#vXnmC|fR40>-EU>y*Zwl9@_*QB^XS2&$IZCMLyhA%H;;E`jo*?zxgP(d@8HCfiKo}X
zpLMdHKYc!_B27M@oa&%WT@Rd|oPNA7B6c`sdQ0f7P9;
z8hbSIyg^8!vQYv%3CQ^H1JhhP+)E{>S3e<*NT5
z7j+366&$-Jh$9GIu0|+id4c+ubxc}L#@@74%FZ2>^xWLc96wjrw7pw0HZxLoe&?F~
zpNjzXGYk%2ex3gJxBl)X0JQ`}qbx#HN=-h>&?#X+Ro8O}Zyk0#q`kgRZ0ojlVxYa@
z))7ijiACte#@m$+D~S=eFP^?z?E>#spgWp|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