ó
    †ñ:i
g  ã                  óâ   • S r SSKJr  SSKJr  SSKJr  SSKr	SSK
rSSKJr  SSKJrJr  SSKJr  SS	KJr  SS
 jrS r " S S5      r                    S       SS jjrSS jrg)z!Visualize cumulative SHAP values.é    )ÚannotationsNé   )Úhclust_ordering)Ú	LogitLinkÚconvert_to_linké   )Úcolors)Úlabelsc                ó  • UR                   S:X  a  X U-
  UR                  S   -  -   $ UR                  S   nX3S-   -  S-  nX-
  U-  S-  nX%-   n[        R                  " US   5      nUSS2US   US   4==   U-  ss'   U$ )z«Shift SHAP base value to a new value. This function assumes that `base_value` and `new_base_value` are scalars
and that `shap_values` is a two or three dimensional array.
r   r   r   N)ÚndimÚshapeÚnpÚdiag_indices_from)Ú
base_valueÚnew_base_valueÚshap_valuesÚmain_effectsÚall_effectsÚtempÚidxs          ÚW/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/shap/plots/_decision.pyÚ__change_shap_base_valuer      s§   € ð
 ×Ñ˜1ÓØ¨>Ñ9¸[×=NÑ=NÈqÑ=QÑQÑQÐQð ×$Ñ$ QÑ'€LØ°Ñ"2Ñ3°qÑ8€KØÑ'¨;Ñ6¸Ñ:€DØÑ$€Kä
×
Ò
˜{¨1™~Ó
.€CØ’�3�q‘6˜3˜q™6Ð!Ó" dÑ*Ó"ØÐó    c                óÒ  • SnU(       a+  [         R                  " 5       R                  SUU-  S-   5        [         R                  " U SSS9  [	        SU5       H  n[         R
                  " UU	SS	SS
9  M     [        R                  " S[        S9n[        R                  " UUR                  S   5      n[        R                  " SUR                  S   5      nUb
  SUU'   SUU'   [         R                  " 5       nUR                  U
5        [        R                  " US9nUR                  U
5        [        R                   " SUS-   5      n/ n[	        UR                  S   5       HQ  n[         R"                  " UUSS24   UUR%                  UUS4   U5      UU   UU   S9nUR'                  US   5        MS     [)        S U 5       S5      nUc  SOSnUR                  S   S:X  Ga  UGb  [         R                  " 5       R*                  R-                  5       n[         R                  " 5       R.                  R1                  5       nUS-   n[	        U5       GH™  nUSU4   n[3        U[4        5      (       a  S[5        U5      R7                  5        S3nO1SR9                  US R;                  S5      R;                  S5      5      nUR=                  [        R>                  " USUUS-   24   5      UU   SU-   USSSS 9n URA                  U RC                  US!95      n!U!RD                  U
S   :”  d  MÛ  U RG                  US-   5        U RI                  [        RJ                  " USUUS-   24   5      5        U RM                  S"5        URA                  U RC                  US!95      n!U!RN                  U
S   :  d  GMc  U RG                  U5        U RI                  U
S   5        U RM                  S5        GMœ     URP                  RS                  S#5        URT                  RS                  S$5        URV                  S"   RY                  S%5        URV                  S   RY                  S%5        UR[                  XˆS&S'9  [         R\                  " [        R                   " U5      S-   UUS(9  UR[                  S)S*S+9  [         R^                  " SU5        [         R`                  " [b        S,   SS(9  U(       Ga  [        R                  " US9nURe                  [        R                  " SS/5      5        [         R^                  " SUS--   5        URg                  U
S   X:S   U
S   -
  S-4UR.                  S.9n"[         Rh                  " USS/S/U"S09n#U#Rk                  / 5        U#Rl                  R[                  S*SS19  U#Ro                  U5        U#Rp                  RY                  S%5        [         Rr                  " U5        U(       a  [         Rt                  " U5        U(       a#  [         R                  " 5       Rw                  5         Ub  URy                  UUUS29  U(       a  [         Rz                  " 5         gg)3z(Matplotlib rendering for decision_plot()gš™™™™™Ù?é   g      ø?z#999999éÿÿÿÿ)ÚxÚcolorÚzorderr   g      à?)r   é   )Úyr   ÚlwÚdashesr   Ú-)Údtyper   Nz-.r   )Úcmap)r   Ú	linewidthÚ	linestylec              3  ó6   #   • U  H  nS U;   d  M  Uv •  M     g7f)ú *
N© )Ú.0Úss     r   Ú	<genexpr>Ú-__decision_plot_matplotlib.<locals>.<genexpr>\   s   é € Ð6š�A¨&°A©+�a‰ašùs   ‚
�	é   é	   Ú(Ú)z({})z,.3fÚ0Ú.z  ÚleftÚcenter_baselinez#666666)ÚfontsizeÚhorizontalalignmentÚverticalalignmentr   )ÚrendererÚrightÚbothÚnoneFT)r   Ú
labelcolorÚlabeltop)r8   r   é   )Ú	labelsizeÚMODEL_OUTPUTg      Ð?)Ú	transformÚ
horizontal)ÚticksÚorientationÚcax)rB   Úlength)Úhandlesr
   Úloc)>ÚpltÚgcfÚset_size_inchesÚaxvlineÚrangeÚaxhliner   ÚarrayÚobjectÚrepeatr   ÚgcaÚset_xlimÚcmÚScalarMappableÚset_climÚarangeÚplotÚto_rgbaÚappendÚnextÚcanvasÚget_rendererÚ	transDataÚinvertedÚ
isinstanceÚstrÚstripÚformatÚrstripÚtextÚmaxÚtransform_bboxÚget_window_extentÚxmaxÚset_textÚset_xÚminÚset_horizontalalignmentÚxminÚxaxisÚset_ticks_positionÚyaxisÚspinesÚset_visibleÚtick_paramsÚyticksÚylimÚxlabelr
   Ú	set_arrayÚ
inset_axesÚcolorbarÚset_ticklabelsÚaxÚ	set_alphaÚoutlineÚscaÚtitleÚinvert_yaxisÚlegendÚshow)$r   ÚcumsumÚ	ascendingÚfeature_display_countÚfeaturesÚfeature_namesÚ	highlightÚ
plot_colorÚ
axis_colorÚy_demarc_colorÚxlimÚalphaÚ	color_barÚauto_size_plotrƒ   r†   Úlegend_labelsÚlegend_locationÚ
row_heightÚir(   r'   r   ÚmÚy_posÚlinesÚor-   r8   r;   ÚinverterÚvÚtÚbbÚax_cbÚcbs$                                       r   Ú__decision_plot_matplotlibr¢   #   sR  € ð, €JÞÜ�Š‹	×!Ñ! !Ð%:¸ZÑ%GÈ#Ñ%MÔNô ‡K‚K�* I°bÒ9ô �1Ð+Ö,ˆÜ�Š�a˜~°#¸fÈRÔPñ -ô —’˜¤FÑ+€IÜ—	’	˜) V§\¡\°!¡_Ó5€IÜ—	’	˜!˜VŸ\™\¨!™_Ó-€IØÑØ#ˆ	�)ÑØ ˆ	�)Ñô 
�Š‹€BØ‡K�K�ÔÜ
×Ò˜zÑ*€AØ‡J�JˆtÔÜ�IŠI�aÐ.°Ñ2Ó3€EØ€EÜ�6—<‘< ‘?Ö#ˆÜ�HŠHØ�1’a�4‰L˜% q§y¡y°¸¸2¸±ÀÓ'FÐR[Ð\]ÑR^ÐjsÐtuÑjvñ
ˆð 	�‰�Q�q‘TÖñ	 $ô 	Ñ6™Ó6¸Ó=€AØ‘Y‰r A€Hð 	�‰�Q‰˜1Ô 8Ò#7Ü—7’7“9×#Ñ#×0Ñ0Ó2ˆÜ—7’7“9×&Ñ&×/Ñ/Ó1ˆØ˜‘ˆÜÐ,×-ˆAØ˜˜A˜‘ˆAÜ˜!œS×!Ñ!Øœ˜A›Ÿ™›Ð' qÐ)‘à—M‘M Q t H×"4Ñ"4°SÓ"9×"@Ñ"@ÀÓ"EÓF�Ø—‘Ü—’�v˜a  a¨!¡e ˜nÑ-Ó.Ø�a‘Ø�q‘Ø!Ø$*Ø"3Øð ð ˆAð ×(Ñ(¨×)<Ñ)<ÀhÐ)<Ð)OÓPˆBØ�w‰w˜˜a™Õ Ø—
‘
˜1˜t™8Ô$Ø—‘œŸš˜v a¨¨a°!©e¨ nÑ5Ó6Ô7Ø×)Ñ)¨'Ô2Ø×,Ñ,¨Q×-@Ñ-@È(Ð-@Ð-SÓT�Ø—7‘7˜T !™WÖ$Ø—J‘J˜q”MØ—G‘G˜D ™GÔ$Ø×-Ñ-¨f×5ñ1 .ð6 ‡H�H×Ñ Ô'Ø‡H�H×Ñ Ô'Ø‡I�IˆgÑ×"Ñ" 5Ô)Ø‡I�IˆfÑ×!Ñ! %Ô(Ø‡N�N˜ÀT€NÑJÜ‡J‚JŒr�yŠyÐ.Ó/°#Ñ5°}ÈxÒXØ‡N�N�3 "€NÑ%Ü‡H‚HˆQÐ%Ô&Ü‡J‚JŒv�nÑ%°Ò3÷ Ü×Ò :Ñ.ˆØ	�‰”B—H’H˜a ˜VÓ$Ô%ô 	�Š�Ð)¨DÑ0Ô1Ø—‘˜t A™wÐ(=ÀA¹wÈÈaÉÑ?PÐRVÐWÐce×coÑco�ÐpˆÜ�\Š\˜! A q 6°|ÈÑOˆØ
×Ñ˜"ÔØ
�‰×Ñ B¨qÐÑ1Ø
�‰�UÔØ
�
‰
×Ñ˜uÔ%ô 	�Š�Œæä�	Š	�%ÔæÜ�Š‹	×ÑÔ àÑ Ø
�	‰	˜%¨¸?ˆ	ÑKæÜ�Š�
ð r   c                  ó   • \ rS rSrSrS rSrg)ÚDecisionPlotResulté¨   z”The optional return value of decision_plot.

The class attributes can be used to apply the same scale and feature ordering to other decision plots.
c                ó@   • Xl         X l        X0l        X@l        XPl        g)a\  Example
-------
Plot two decision plots using the same feature order and x-axis.
>>> range1, range2 = range(20), range(20, 40)
>>> r = decision_plot(base, shap_values[range1], features[range1], return_objects=True)
>>> decision_plot(base, shap_values[range2], features[range2], feature_order=r.feature_idx, xlim=r.xlim)

Parameters
----------
base_value : float
    The base value used in the plot. For multioutput models,
    this will be the mean of the base values. This will inherit `new_base_value` if specified.

shap_values : numpy.ndarray
    The `shap_values` passed to decision_plot re-ordered based on `feature_order`. If SHAP interaction values
    are passed to decision_plot, `shap_values` is a 2D (matrix) representation of the interactions. See
    `feature_names` to locate the feature positions. If `new_base_value` is specified, the SHAP values are
    relative to the new base value.

feature_names : list of str
    The feature names used in the plot in the order specified in the decision_plot parameter `feature_order`.

feature_idx : numpy.ndarray
    The index used to order `shap_values` based on `feature_order`. This attribute can be used to specify
    identical feature ordering in multiple decision plots.

xlim : tuple[float, float]
    The x-axis limits. This attributed can be used to specify the same x-axis in multiple decision plots.

N)r   r   r‹   Úfeature_idxr�   )Úselfr   r   r‹   r§   r�   s         r   Ú__init__ÚDecisionPlotResult.__init__®   s    € ð> %ŒØ&ÔØ*ÔØ&ÔØ�	r   )r   r§   r‹   r   r�   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r©   Ú__static_attributes__r+   r   r   r¤   r¤   ¨   s   † ñõ
#r   r¤   c                óú  • [        U [        R                  5      (       a  [        U 5      S:X  a  U S   n [        U [        5      (       d  [        U[        5      (       a  [        S5      e[        U[        R                  5      (       d  [        S5      eUR                  S:X  a  UR                  SS5      nUR                  S   nUR                  S   n[        U[        R                  5      (       a*  Uc  UR                  R                  5       nUR                  nOŽ[        U[        R                  5      (       a*  Uc  UR                  R                  5       nUR                  nOE[        U[        5      (       a  Uc  UnSnO(Ub%  UR                  S:X  a  Uc  UR!                  5       nSn[        U[        R                  [#        S5      45      (       d  [        S5      eUb"  UR                  S:X  a  UR                  SS5      nUc/  [%        U5       Vs/ s H  n[&        S   [)        U5      -  PM     nnOJ[        U5      U:w  a  [+        S	5      e[        U[        [        R                  45      (       d  [        S
5      eUR                  S:X  Ga  UUS-
  -  S-  n[        R,                  " US   5      n[        R.                  " US   S5      n[        R                  " UUU-   4UR0                  5      nUSS2US   US   4   USS2SU24'   USS2US   US   4   S-  USS2US24'   UnS/UR                  S   -  nUUSU& [3        [%        UUR                  S   5      US   US   5       H  u  nnnUU    SUU    3UU'   M     UnUR                  S   nSn[        U[        5      (       a  [        R4                  " U5      n OÓ[        U[        R                  5      (       a  Un O±Ub  UR7                  5       S:X  a  [        R8                  " U5      n OƒUS:X  a>  [        R:                  " [        R<                  " [        R>                  " U5      SS95      n O?US:X  a.  [        R4                  " [A        URC                  5       5      5      n O[+        S5      eU R                  U4:w  d4  [        RD                  " U R0                  [        RF                  5      (       d  [+        S5      eUc  [I        SSS5      nOÓ[        U[H        [$        45      (       d  [        S5      eURJ                  S;  a  [+        S5      e[        U[$        5      (       a}  [        RL                  " [        RF                  5      RN                  n![I        URP                  S:¼  a  URP                  OU!URR                  S:¼  a  URR                  OU!URJ                  5      nUb  [U        U UU5      nUn URW                  U5      n"Sn#U"S   S:X  a  Sn#U"S   S-   U"S   S-   S4n"U"S   U"S   -
  n$USS2U 4   nU"S   S:X  a]  [        R                  " UU$S-   4UR0                  5      n%U U%SS2S4'   U [        RX                  " USS2SU"S   24   SS9-   U%SS2SS24'   O*U [        RX                  " USS9SS2U"S   S-
  U"S   24   -   n%[        R4                  " U5      nUU U"S   U"S       R!                  5       n&UU    R!                  5       nUc  SOUSS2U U"S   U"S    4   n'U(       dE  US:”  a  [[        SU S35      eU$S:”  a  [[        SU$ S35      eUU-  S:”  a  [[        S U S!U S"35      eUSL n([]        U5      nU n)[        U[^        5      (       a,  URa                  U 5      n URa                  U%5      n%U((       a  S#nO€U((       ay  [O        U%RO                  5       U 45      n*[c        U%Rc                  5       U 45      n+U U*-
  U+U -
  n-n,U,U-:”  a  U U,-
  U U--   4nO
U U--
  U U--   4nUS   US   -
  S$-  n.US   U.-
  US   U.-   4nUc  S%nUc  [d        Rf                  n[i        U U%U#U$U'U&UUU	U
UUUUUUUU5        U(       d  g[k        U)XU U5      $ s  snf )&a  Visualize model decisions using cumulative SHAP values.

Each plotted line explains a single model prediction. If a single prediction is plotted, feature values will be
printed in the plot (if supplied). If multiple predictions are plotted together, feature values will not be printed.
Plotting too many predictions together will make the plot unintelligible.

Parameters
----------
base_value : float or numpy.ndarray
    This is the reference value that the feature contributions start from. Usually, this is
    ``explainer.expected_value``.

shap_values : numpy.ndarray
    Matrix of SHAP values (# features) or (# samples x # features) from
    ``explainer.shap_values()``. Or cube of SHAP interaction values (# samples x
    # features x # features) from ``explainer.shap_interaction_values()``.

features : numpy.array or pandas.Series or pandas.DataFrame or numpy.ndarray or list
    Matrix of feature values (# features) or (# samples x # features). This provides the values of all the
    features and, optionally, the feature names.

feature_names : list or numpy.ndarray
    List of feature names (# features). If ``None``, names may be derived from the
    ``features`` argument if a Pandas object is provided. Otherwise, numeric feature
    names will be generated.

feature_order : str or None or list or numpy.ndarray
    Any of "importance" (the default), "hclust" (hierarchical clustering), ``None``,
    or a list/array of indices.

feature_display_range: slice or range
    The slice or range of features to plot after ordering features by ``feature_order``. A step of 1 or ``None``
    will display the features in ascending order. A step of -1 will display the features in descending order. If
    ``feature_display_range=None``, ``slice(-1, -21, -1)`` is used (i.e. show the last 20 features in descending order).
    If ``shap_values`` contains interaction values, the number of features is automatically expanded to include all
    possible interactions: N(N + 1)/2 where N = ``shap_values.shape[1]``.

highlight : Any
    Specify which observations to draw in a different line style. All numpy indexing methods are supported. For
    example, list of integer indices, or a bool array.

link : str
    Use "identity" or "logit" to specify the transformation used for the x-axis. The "logit" link transforms
    log-odds into probabilities.

plot_color : str or matplotlib.colors.ColorMap
    Color spectrum used to draw the plot lines. If ``str``, a registered matplotlib color name is assumed.

axis_color : str or int
    Color used to draw plot axes.

y_demarc_color : str or int
    Color used to draw feature demarcation lines on the y-axis.

alpha : float
    Alpha blending value in [0, 1] used to draw plot lines.

color_bar : bool
    Whether to draw the color bar (legend).

auto_size_plot : bool
    Whether to automatically size the matplotlib plot to fit the number of features
    displayed. If ``False``, specify the plot size using matplotlib before calling
    this function.

title : str
    Title of the plot.

xlim: tuple[float, float]
    The extents of the x-axis (e.g. ``(-1.0, 1.0)``). If not specified, the limits
    are determined by the maximum/minimum predictions centered around base_value
    when ``link="identity"``. When ``link="logit"``, the x-axis extents are ``(0,
    1)`` centered at 0.5. ``xlim`` values are not transformed by the ``link``
    function. This argument is provided to simplify producing multiple plots on the
    same scale for comparison.

show : bool
    Whether :external+mpl:func:`matplotlib.pyplot.show()` is called before returning.
    Setting this to ``False`` allows the plot
    to be customized further after it has been created.

return_objects : bool
    Whether to return a :obj:`DecisionPlotResult` object containing various plotting
    features. This can be used to generate multiple decision plots using the same
    feature ordering and scale.

ignore_warnings : bool
    Plotting many data points or too many features at a time may be slow, or may create very large plots. Set
    this argument to ``True`` to override hard-coded limits that prevent plotting large amounts of data.

new_base_value : float
    SHAP values are relative to a base value. By default, this base value is the
    expected value of the model's raw predictions. Use ``new_base_value`` to shift
    the base value to an arbitrary value (e.g. the cutoff point for a binary
    classification task).

legend_labels : list of str
    List of legend labels. If ``None``, legend will not be shown.

legend_location : str
    Legend location. Any of "best", "upper right", "upper left", "lower left", "lower right", "right",
    "center left", "center right", "lower center", "upper center", "center".

Returns
-------
DecisionPlotResult or None
    Returns a :obj:`DecisionPlotResult` object if ``return_objects=True``. Returns ``None`` otherwise (the default).

Examples
--------
Plot two decision plots using the same feature order and x-axis.

    >>> range1, range2 = range(20), range(20, 40)
    >>> r = decision_plot(base, shap_values[range1], features[range1], return_objects=True)
    >>> decision_plot(base, shap_values[range2], features[range2], feature_order=r.feature_idx, xlim=r.xlim)

See more `decision plot examples here <https://shap.readthedocs.io/en/latest/example_notebooks/api_examples/plots/decision_plot.html>`_.

r   r   zgLooks like multi output. Try base_value[i] and shap_values[i], or use shap.multioutput_decision_plot().zCThe shap_values arg is the wrong type. Try explainer.shap_values().r   Nz*The features arg uses an unsupported type.ÚFEATUREzKThe feature_names arg must include all features represented in shap_values.z5The feature_names arg requires a list or numpy array.é   r   r*   r>   Ú
importance)ÚaxisÚhclustzkThe feature_order arg requires 'importance', 'hclust', 'none', or an integer list/array of feature indices.zˆA list or array has been specified for the feature_order arg. The length must match the feature count and the data type must be integer.iëÿÿÿz:The feature_display_range arg requires a slice or a range.)r   r   Nz@The feature_display_range arg supports a step of 1, -1, or None.TFiÐ  z	Plotting zc observations may be slow. Consider subsampling or set ignore_warnings=True to ignore this message.éÈ   zX features may create a very large plot. Set ignore_warnings=True to ignore this message.i áõzProcessing SHAP values for z features over zK observations may be slow. Set ignore_warnings=True to ignore this message.)g{®Gáz”¿gR¸…ëQð?g{®Gáz”?g      ð?)6rc   r   ÚndarrayÚlenÚlistÚ	TypeErrorr   Úreshaper   ÚpdÚ	DataFrameÚcolumnsÚto_listÚvaluesÚSeriesÚindexÚtolistÚtyperP   r
   rd   Ú
ValueErrorr   Útriu_indices_fromr%   ÚziprR   ÚlowerrZ   ÚargsortÚsumÚabsr   Ú	transposeÚ
issubdtypeÚintegerÚsliceÚstepÚiinforo   ÚstartÚstopr   ÚindicesÚ	nancumsumÚRuntimeErrorr   r   Úfinvri   r	   Úred_bluer¢   r¤   )/r   r   rŠ   r‹   Úfeature_orderÚfeature_display_rangerŒ   Úlinkr�   rŽ   r�   r‘   r’   r“   rƒ   r�   r†   Úreturn_objectsÚignore_warningsr   r”   r•   Úobservation_countÚfeature_countr—   Ú
triu_countÚidx_diagÚidx_triuÚaÚbÚrowÚcolr§   ÚcÚdrˆ   r‰   r‡   Úfeature_names_displayÚfeatures_displayÚcreate_xlimÚbase_value_savedrq   rl   Únr˜   Úes/                                                  r   Údecisionrð   Ô   s«  € ô` �*œbŸj™j×)Ñ)¬c°*«oÀÓ.BØ ‘]ˆ
ä�*œd×#Ñ#¤z°+¼t×'DÑ'DÜØuó
ð 	
ô
 �k¤2§:¡:×.Ñ.ÜÐ]Ó^Ð^ð ×Ñ˜1ÓØ!×)Ñ)¨!¨RÓ0ˆØ#×)Ñ)¨!Ñ,ÐØ×%Ñ% aÑ(€Mô �(œBŸL™L×)Ñ)ØÑ Ø$×,Ñ,×4Ñ4Ó6ˆMØ—?‘?‰Ü	�HœbŸi™i×	(Ñ	(ØÑ Ø$ŸN™N×2Ñ2Ó4ˆMØ—?‘?‰Ü	�Hœd×	#Ñ	#ØÑ Ø$ˆMØ‰Ø	Ñ	 (§-¡-°1Ó"4¸Ñ9NØ Ÿ™Ó)ˆØˆô �h¤§¡¬T°$«ZÐ 8×9Ñ9ÜÐDÓEÐEØÑ 8§=¡=°AÓ#5Ø×#Ñ# A rÓ*ˆð ÑÜ=BÀ=Ô=QÓRÒ=Q¸œ 	Ñ*¬S°«VÔ3Ñ=QˆÐRˆÜ	ˆ]Ó	˜}Ó	,ÜÐfÓgÐgÜ˜¬¬b¯j©jÐ'9×:Ñ:ÜÐOÓPÐPð ×Ñ˜1Ôà" m°aÑ&7Ñ8¸AÑ=ˆ
Ü×'Ò'¨°A©Ó7ˆÜ×'Ò'¨°A©¸Ó:ˆÜŸ
š
Ð$5°}ÀzÑ7QÐ#RÐT_×TeÑTeÓfˆØ*ª1¨h°q©k¸8ÀA¹;Ð+FÑGˆŠ!ˆ^ˆmˆ^Ð
ÑØ*ª1¨h°q©k¸8ÀA¹;Ð+FÑGÈ!ÑKˆŠ!ˆ]‰^Ð
ÑØˆà#˜f {×'8Ñ'8¸Ñ';Ñ;ˆØ)ˆˆ.ˆ=ÐÜœu ]°K×4EÑ4EÀaÑ4HÓIÈ8ÐTUÉ;ÐX`ÐabÑXcÖd‰KˆAˆs�CØ# CÑ(Ð)¨¨m¸CÑ.@Ð-AÐBˆAˆa‹Dñ eàˆØ#×)Ñ)¨!Ñ,ˆØˆô �-¤×&Ñ&Ü—h’h˜}Ó-‰Ü	�M¤2§:¡:×	.Ñ	.Ø#‰Ø
Ñ
 ]×%8Ñ%8Ó%:¸fÓ%DÜ—i’i Ó.‰Ø	˜,Ó	&Ü—j’j¤§¢¬¯ª¨{Ó(;À!Ñ!DÓE‰Ø	˜(Ó	"Ü—h’hœ¨{×/DÑ/DÓ/FÓGÓH‰äð"ó
ð 	
ð
 	×Ñ˜mÐ-Ó-´r·}²}À[×EVÑEVÔXZ×XbÑXb×7cÑ7cÜð?ó
ð 	
ð Ñ$Ü % b¨#¨rÓ 2ÑÜÐ-´´u¨~×>Ñ>ÜÐTÓUÐUØ	×	#Ñ	#¨=Ó	8ÜÐ[Ó\Ð\Ü	Ð)¬5×	1Ñ	1ô �HŠH”R—Z‘ZÓ ×$Ñ$ˆÜ %Ø+@×+FÑ+FÈ!Ó+KÐ!×'Ò'ÐQRØ*?×*DÑ*DÈÓ*IÐ!×&Ò&ÈqØ!×&Ñ&ó!
Ðð Ñ!Ü.¨z¸>È;ÓWˆØ#ˆ
ð 	×%Ñ% mÓ4€AØ€IØˆ�tˆrƒzØˆ	Øˆq‰T�A‰X�q˜‘t˜a‘x Ð#ˆØ˜a™D 1 Q¡4™KÐØša ˜nÑ-€KØˆ�tˆqƒyÜŸZšZÐ):Ð<QÐTUÑ<UÐ(VÐXc×XiÑXiÓjˆØ!ˆŠq�!ˆt‰Ø"¤R§\¢\°+ºaÀÀQÀqÁTÀ¸kÑ2JÐQRÑ%SÑSˆŠq�!‘"ˆuŠàœbŸlšl¨;¸QÑ?ÂÀAÀaÁDÈ1ÁHÐPQÐRSÑPTÐCTÐ@TÑUÑUˆô —H’H˜]Ó+€MØ)¨+°a¸±d¸Q¸q¹TÐ*BÑC×JÑJÓLÐØ! +Ñ.×5Ñ5Ó7€MØ'Ñ/‘t°XºaÀÈQÈqÉTÐTUÐVWÑTXÐAYÐ>YÑ5ZÐö Ø˜tÓ#ÜØÐ-Ð.ð /?ð ?óð ð ! 3Ó&ÜØÐ1Ð2ð 3ð óð ð
 Ð,Ñ,¨yÓ8ÜØ-¨m¨_¸OÐL]ÐK^ð _ð óð ð ˜$�,€KÜ˜4Ó €DØ!ÐÜ�$œ	×"Ñ"Ø—Y‘Y˜zÓ*ˆ
Ø—‘˜6Ó"ˆÞà ˆDøÞ	Ü˜6Ÿ:™:›<¨Ð4Ó5ˆÜ˜6Ÿ:™:›<¨Ð4Ó5ˆà˜TÑ! T¨JÑ%6ˆ1ˆØˆq‹5Ø ‘N J°¡NÐ3‰Dà ‘N J°¡NÐ3ˆDà�!‰W�t˜A‘wÑ $Ñ&ˆØ�Q‘˜!‘˜T !™W q™[Ð)ˆð �}ØˆàÑÜ—_‘_ˆ
äØØØØØØØØØØØØØØØØØØô%ö* ØäÐ.°ÈKÐY]Ó^Ð^ùòS Ss   Èa8c                óŒ  • [        U [        5      (       a  [        U[        5      (       d  [        S5      e[        R                  " U 5      n U R
                  S:X  d?  [        R                  " U R                  [        R                  5      (       d  [        S5      e[        R                  " U5      nUR
                  S;  a  [        S5      eUR                  S   U R                  S   :w  a  [        S5      eU R                  5       n[        UR                  S   5       H  n[        X   XAU   5      X'   M     Ubt  S	U;   an  US	   n[        U[        R                  5      (       a  UR
                  S
:X  a	  Xb/   US	'   O1[        U[        R                  5      (       a  UR                   U   US	'   [#        XASS2USS24   40 UD6$ )aS  Decision plot for multioutput models.

Plots all outputs for a single observation. By default, the plotted base value will be the mean of base_values
unless new_base_value is specified. Supports both SHAP values and SHAP interaction values.

Parameters
----------
base_values : list of float
    This is the reference value that the feature contributions start from. Use explainer.expected_value.

shap_values : list of numpy.ndarray
    A multioutput list of SHAP matrices or SHAP cubes from explainer.shap_values() or
    explainer.shap_interaction_values(), respectively.

row_index : int
    The integer index of the row to plot.

**kwargs : Any
    Arguments to be passed on to decision_plot().

Returns
-------
DecisionPlotResult or None
    Returns a DecisionPlotResult object if `return_objects=True`. Returns `None` otherwise (the default).

z2The base_values and shap_values args expect lists.r   z0The base_values arg should be a list of scalars.)r³   é   zMThe shap_values arg should be a list of two or three dimensional SHAP arrays.r   z<The base_values output length is different than shap_values.NrŠ   r   )rc   rº   rÆ   r   rR   r   rÎ   r%   Únumberr   ÚmeanrP   r   r¸   r½   r¾   Úilocrð   )Úbase_valuesr   Ú	row_indexÚkwargsÚbase_values_meanr—   rŠ   s          r   Úmultioutput_decisionrú   <  s…  € ô8 �{¤D×)Ñ)¬j¸Äd×.KÑ.KÜÐMÓNÐNô —(’(˜;Ó'€KØ×Ñ Ó"¬¯ª°k×6GÑ6GÌÏÉ×(SÑ(SÜÐKÓLÐLÜ—(’(˜;Ó'€KØ×Ñ˜vÓ%ÜÐhÓiÐiØ×Ñ˜Ñ˜{×0Ñ0°Ñ3Ó3ÜÐWÓXÐXð #×'Ñ'Ó)ÐÜ�;×$Ñ$ QÑ'Ö(ˆÜ1°+±.ÐBRÐ`aÑTbÓcˆ‹ñ )ð 	Ñ ¨vÓ!5Ø˜*Ñ%ˆÜ�h¤§
¡
×+Ñ+°·±À!Ó1CØ!)¨+Ñ!6ˆF�:ÒÜ˜¤"§,¡,×/Ñ/Ø!)§¡¨yÑ!9ˆF�:ÑäÐ$²!°YÂ°/Ñ&BÑMÀfÑMÐMr   )Úreturnú
np.ndarray)NNr´   NNÚidentityNú#333333rþ   NTTNNTFFNNÚbest)r   zfloat | np.ndarrayr   rü   rŠ   z3np.ndarray | pd.Series | pd.DataFrame | list | Nonerû   úDecisionPlotResult | None)rû   r   )r¯   Ú
__future__r   Úmatplotlib.cmrW   Úmatplotlib.pyplotÚpyplotrL   Únumpyr   Úpandasr½   Úutilsr   Úutils._legacyr   r   Ú r	   Ú_labelsr
   r   r¢   r¤   rð   rú   r+   r   r   Ú<module>r     sµ   ðÙ 'å "å Ý Û Û å #ß 6Ý Ý ôò&B÷J)ñ )ð^ EIØØØØØ	ØØØØ
ØØØ
Ø	Ø	ØØØØØð-e_Ø"ðe_àðe_ð Bðe_ð. õ/e_õP6Nr   