From 389261994a43526b5daf7e0b44ff189e46d7a62b Mon Sep 17 00:00:00 2001 From: bewygs <97663334+bewygs@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:11:26 +0200 Subject: [PATCH] Correct data type in docstring for max_display in waterfall plot (#3627) Co-authored-by: connortann <71127464+connortann@users.noreply.github.com> --- shap/plots/_waterfall.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shap/plots/_waterfall.py b/shap/plots/_waterfall.py index 8a73646ba..8217967a3 100644 --- a/shap/plots/_waterfall.py +++ b/shap/plots/_waterfall.py @@ -30,8 +30,8 @@ def waterfall(shap_values, max_display=10, show=True): shap_values : Explanation A one-dimensional :class:`.Explanation` object that contains the feature values and SHAP values to plot. - max_display : str - The maximum number of features to plot (default is 10). + max_display : int + The maximum number of features to display (default is 10). show : bool Whether ``matplotlib.pyplot.show()`` is called before returning. @@ -343,8 +343,8 @@ def waterfall_legacy(expected_value, shap_values=None, features=None, feature_na feature_names : list List of feature names (# features). - max_display : str - The maximum number of features to plot. + max_display : int + The maximum number of features to display (default is 10). show : bool Whether matplotlib.pyplot.show() is called before returning. Setting this to False allows the plot