ó
    §ñ:i´  ã                   óh   • S SK rSSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr   " S S	5      rS
 rS rg)é    Né   )Úcheck_consistent_length)Úcheck_matplotlib_support)Ú_get_response_values_binary)Útype_of_target)Ú_check_pos_label_consistencyc                   ó`   • \ rS rSrSrSSS.S jr\SSSS.S j5       r\SSSS	.S
 j5       rSr	g)Ú"_BinaryClassifierCurveDisplayMixiné
   zÌMixin class to be used in Displays requiring a binary classifier.

The aim of this class is to centralize some validations regarding the estimator and
the target and gather the response of the estimator.
N)ÚaxÚnamec                óº   • [        U R                  R                   S35        SS KJn  Uc  UR                  5       u  pAUc  U R                  OUnXR                  U4$ )Nz.plotr   )r   Ú	__class__Ú__name__Úmatplotlib.pyplotÚpyplotÚsubplotsÚestimator_nameÚfigure)Úselfr   r   ÚpltÚ_s        ÚZ/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/sklearn/utils/_plotting.pyÚ_validate_plot_paramsÚ8_BinaryClassifierCurveDisplayMixin._validate_plot_params   sQ   € Ü  D§N¡N×$;Ñ$;Ð#<¸EÐ!BÔCÝ'à‰:Ø—L‘L“N‰EˆAà&*¡lˆt×"Ò"¸ˆØ—9‘9˜dÐ"Ð"ó    Úauto)Úresponse_methodÚ	pos_labelr   c                óŒ   • [        U R                   S35        Uc  UR                  R                  OUn[        UUUUS9u  puXuU4$ )Nz.from_estimator)r   r   )r   r   r   r   )ÚclsÚ	estimatorÚXÚyr   r   r   Úy_preds           r   Ú!_validate_and_get_response_valuesÚD_BinaryClassifierCurveDisplayMixin._validate_and_get_response_values   sT   € ô 	! C§L¡L >°Ð!AÔBà/3©|ˆy×"Ñ"×+Ò+Àˆä7ØØØ+Øñ	
Ñˆð  $Ð&Ð&r   )Úsample_weightr   r   c                óÂ   • [        U R                   S35        [        U5      S:w  a  [        S[        U5       S35      e[	        XU5        [        XA5      nUb  UOSnXE4$ )Nz.from_predictionsÚbinaryz The target y is not binary. Got z type of target.Ú
Classifier)r   r   r   Ú
ValueErrorr   r   )r!   Úy_truer%   r(   r   r   s         r   Ú!_validate_from_predictions_paramsÚD_BinaryClassifierCurveDisplayMixin._validate_from_predictions_params,   st   € ô 	! C§L¡L >Ð1BÐ!CÔDä˜&Ó! XÓ-ÜØ2´>À&Ó3IÐ2Jð Kð óð ô
 	  °Ô>Ü0°ÓCˆ	àÑ'‰t¨\ˆàˆÐr   © )
r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Úclassmethodr&   r.   Ú__static_attributes__r0   r   r   r
   r
   
   sI   † ñð +/°Tõ #ð à17À4Èdô'ó ð'ð  à.2¸dÈôó ór   r
   c                 ó6  • U b  U $ Uc  U(       a  S$ S$ [        U5      (       a  UR                  OUn U(       a"  U R                  S5      (       a  U SS n O$SU  3n OU R                  S5      (       a  SU SS  3n U R                  SS5      n U R	                  5       $ )	a¥  Validate the `score_name` parameter.

If `score_name` is provided, we just return it as-is.
If `score_name` is `None`, we use `Score` if `negate_score` is `False` and
`Negative score` otherwise.
If `score_name` is a string or a callable, we infer the name. We replace `_` by
spaces and capitalize the first letter. We remove `neg_` and replace it by
`"Negative"` if `negate_score` is `False` or just remove it otherwise.
NzNegative scoreÚScoreÚneg_é   z	Negative r   Ú )Úcallabler   Ú
startswithÚreplaceÚ
capitalize)Ú
score_nameÚscoringÚnegate_scores      r   Ú_validate_score_namerC   @   sª   € ð ÑØÐØ	‰Þ#/ÐÐ<°WÐ<ä)1°'×):Ñ):�W×%Ò%Àˆ
ÞØ×$Ñ$ V×,Ñ,Ø'¨¨˜^‘
à(¨¨Ð5‘
Ø×"Ñ" 6×*Ñ*Ø$ Z°° ^Ð$4Ð5ˆJØ×'Ñ'¨¨SÓ1ˆ
Ø×$Ñ$Ó&Ð&r   c                 ó˜   • [         R                  " [         R                  " U 5      5      nUR                  5       UR	                  5       -  $ )zðCompute the ratio between the largest and smallest inter-point distances.

A value larger than 5 typically indicates that the parameter range would
better be displayed with a log scale while a linear scale would be more
suitable otherwise.
)ÚnpÚdiffÚsortÚmaxÚmin)ÚdatarF   s     r   Ú_interval_max_min_ratiorK   [   s1   € ô �7Š7”2—7’7˜4“=Ó!€DØ�8‰8‹:˜Ÿ™›
Ñ"Ð"r   )ÚnumpyrE   Ú r   Ú_optional_dependenciesr   Ú	_responser   Ú
multiclassr   Ú
validationr   r
   rC   rK   r0   r   r   Ú<module>rR      s,   ðÛ å %Ý <Ý 2Ý &Ý 4÷3ñ 3òl'ó6#r   