plot_parshap
Plots the train and test correlation between the shap value of
every feature with its target value, after removing the effect
of all other features (partial correlation). This plot is
useful to identify the features that are contributing most to
overfitting. Features that lie below the bisector (diagonal
line) performed worse on the test set than on the training set.
If the estimator has a feature_importances_
or coef_
attribute,
its normalized values are shown in a color map. Read more about
this plot here.
Parameters: |
models: str, sequence or None, optional (default=None)
columns: int, str, sequence or None, optional (default=None)
target: int or str, optional (default=1)
title: str or None, optional (default=None)
figsize: tuple, optional (default=(10, 6))
filename: str or None, optional (default=None)
display: bool or None, optional (default=True) |
Returns: |
fig: matplotlib.figure.Figure Plot object. Only returned if display=None .
|
Example
from atom import ATOMClassifier
atom = ATOMClassifier(X, y)
atom.run(["GNB", "LGB"])
atom.gnb.plot_parshap()
atom.lgb.plot_parshap()