ó
    Ñ]jµo  ã                   ó¤  • S SK r S SKrS SKrS SKrS SKJrJr  S SKJr  S SK	J
r
  S SKJrJr  S SKrS SKJrJr  S SKJrJr  S SKJr   " S	 S
\\5      rS rS rS r " S S\5      r\R?                  \ 5        S r! " S S\5      r" " S S\"5      r# " S S\"5      r$ " S S\"5      r% " S S\"5      r& " S S\"5      r' " S S\'5      r( " S S \"5      r) " S! S"\"5      r* " S# S$\"5      r+ " S% S&\"5      r, " S' S(\"5      r- " S) S*\"5      r. " S+ S,\"5      r/ " S- S.\"5      r0 " S/ S0\"5      r1 " S1 S2\"5      r2 " S3 S4\"5      r3 " S5 S65      r4S7 r5S8 r6g)9é    N)ÚABCÚabstractmethod)ÚIterable)Ú	signature)ÚIntegralÚReal)Ú
csr_matrixÚissparse)Úconfig_contextÚ
get_config©Ú_is_arraylike_not_scalarc                   ó   • \ rS rSrSrSrg)ÚInvalidParameterErroré   zqCustom exception to be raised when the parameter of a class/method/function
does not have a valid type or value.
© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    Ú\/home/mande/repo/quber/.venv/lib/python3.13/site-packages/sklearn/utils/_param_validation.pyr   r      s   † ôr   r   c                 ó  • UR                  5        HÝ  u  p4X0;  a  M  X   nUS:X  a  M  U Vs/ s H  n[        U5      PM     nnU H  nUR                  U5      (       d  M    MS     U Vs/ s H  ofR                  (       a  M  UPM     nn[	        U5      S:X  a  US    nO6SR                  USS  Vs/ s H  n[        U5      PM     sn5       SUS    3n[        SU< S	U S
U SU< S3	5      e   gs  snf s  snf s  snf )aL  Validate types and values of given parameters.

Parameters
----------
parameter_constraints : dict or {"no_validation"}
    If "no_validation", validation is skipped for this parameter.

    If a dict, it must be a dictionary `param_name: list of constraints`.
    A parameter is valid if it satisfies one of the constraints from the list.
    Constraints can be:
    - an Interval object, representing a continuous or discrete range of numbers
    - the string "array-like"
    - the string "sparse matrix"
    - the string "random_state"
    - callable
    - None, meaning that None is a valid value for the parameter
    - any type, meaning that any instance of this type is valid
    - an Options object, representing a set of elements of a given type
    - a StrOptions object, representing a set of strings
    - the string "boolean"
    - the string "verbose"
    - the string "cv_object"
    - the string "nan"
    - a MissingValues object representing markers for missing values
    - a HasMethods object, representing method(s) an object must have
    - a Hidden object, representing a constraint not meant to be exposed to the user

params : dict
    A dictionary `param_name: param_value`. The parameters to validate against the
    constraints.

caller_name : str
    The name of the estimator or function or method that called this function.
Úno_validationé   r   ú, Néÿÿÿÿú or zThe z parameter of z	 must be z. Got ú	 instead.)ÚitemsÚmake_constraintÚis_satisfied_byÚhiddenÚlenÚjoinÚstrr   )	Úparameter_constraintsÚparamsÚcaller_nameÚ
param_nameÚ	param_valÚconstraintsÚ
constraintÚconstraints_strÚcs	            r   Úvalidate_parameter_constraintsr3      s;  € ðF "(§¡¦Ñˆ
ð Ó2Ùà+Ñ7ˆà˜/Ó)ÙáEPÓQÂ[°z” zÖ2Á[ˆÐQã%ˆJØ×)Ñ)¨)×4Ó4âñ &ñ .9óÚ-8˜z×@QÕ@Q—
©[ð ð ô �;Ó 1Ó$Ø%0°¡^Ð$4‘ð —y‘y°+¸c¸rÑ2BÓ!CÒ2B¨Q¤# a¦&Ñ2BÑ!CÓDÐEð FØ# B™Ð(ð*ð  ô
 (Ø�z‘n N°;°-ð @Ø#Ð$ F¨9©-°yðBóð òG "0ùò Rùòùò "Ds   ­C3Á*C8ÂC8Â2C=
c                 óÂ  • [        U [        5      (       a  U S:X  a
  [        5       $ [        U [        5      (       a  U S:X  a
  [        5       $ [        U [        5      (       a  U S:X  a
  [	        5       $ U [
        L a
  [        5       $ U c
  [        5       $ [        U [        5      (       a  [        U 5      $ [        U [        [        [        [        [        45      (       a  U $ [        U [        5      (       a  U S:X  a
  [        5       $ [        U [        5      (       a  U S:X  a
  [!        5       $ [        U [        5      (       a  U S:X  a
  [#        5       $ [        U [$        5      (       a  ['        U R(                  5      n SU l        U $ [        U [        5      (       a  U S:X  d0  [        U [,        5      (       a%  [.        R0                  " U 5      (       a
  [3        5       $ [5        S	U  35      e)
zÝConvert the constraint into the appropriate Constraint object.

Parameters
----------
constraint : object
    The constraint to convert.

Returns
-------
constraint : instance of _Constraint
    The converted constraint.
z
array-likezsparse matrixÚrandom_stateÚbooleanÚverboseÚ	cv_objectTÚnanúUnknown constraint type: )Ú
isinstancer)   Ú_ArrayLikesÚ_SparseMatricesÚ_RandomStatesÚcallableÚ
_CallablesÚ_NoneConstraintÚtypeÚ_InstancesOfÚIntervalÚ
StrOptionsÚOptionsÚ
HasMethodsÚMissingValuesÚ	_BooleansÚ_VerboseHelperÚ
_CVObjectsÚHiddenr$   r0   r&   ÚfloatÚnpÚisnanÚ_NanConstraintÚ
ValueError©r0   s    r   r$   r$   h   s€  € ô �*œc×"Ñ" z°\Ó'AÜ‹}ÐÜ�*œc×"Ñ" z°_Ó'DÜÓ Ð Ü�*œc×"Ñ" z°^Ó'CÜ‹ÐØ”XÒÜ‹|ÐØÑÜÓ Ð Ü�*œd×#Ñ#Ü˜JÓ'Ð'ÜØ”Xœz¬7´JÄÐN÷ñ ð ÐÜ�*œc×"Ñ" z°YÓ'>Ü‹{ÐÜ�*œc×"Ñ" z°YÓ'>ÜÓÐÜ�*œc×"Ñ" z°[Ó'@Ü‹|ÐÜ�*œf×%Ñ%Ü$ Z×%:Ñ%:Ó;ˆ
Ø ˆ
ÔØÐÜ�:œs×#Ñ#¨
°eÓ(;Ü�:œu×%Ñ%¬"¯(ª(°:×*>Ñ*>äÓÐÜ
Ð0°°Ð=Ó
>Ð>r   c                ó   ^ ^• U U4S jnU$ )av  Decorator to validate types and values of functions and methods.

Parameters
----------
parameter_constraints : dict
    A dictionary `param_name: list of constraints`. See the docstring of
    `validate_parameter_constraints` for a description of the accepted constraints.

    Note that the *args and **kwargs parameters are not validated and must not be
    present in the parameter_constraints dictionary.

prefer_skip_nested_validation : bool
    If True, the validation of parameters of inner estimators or functions
    called by the decorated function will be skipped.

    This is useful to avoid validating many times the parameters passed by the
    user from the public facing API. It's also useful to avoid validating
    parameters that we pass internally to inner functions that are guaranteed to
    be valid by the test suite.

    It should be set to True for most functions, except for those that receive
    non-validated objects as parameters or that are just wrappers around classes
    because they only perform a partial validation.

Returns
-------
decorated_function : function or method
    The decorated function.
c                 óf   >^ • [        T ST5        [        R                  " T 5      U UU4S j5       nU$ )NÚ_skl_parameter_constraintsc                  ó  >• [        5       S   nU(       a  T" U 0 UD6$ [        T5      nUR                  " U 0 UD6nUR                  5         UR                  R                  5        Vs/ s H7  nUR                  UR                  UR                  4;   d  M+  UR                  PM9     nnUSS/-  nUR                  R                  5        VVs0 s H  u  pxXv;  d  M  Xx_M     nnn[        TUTR                  S9   [        T=(       d    US9   T" U 0 UD6sS S S 5        $ s  snf s  snnf ! , (       d  f       g = f! [         a@  n	[         R"                  " SSTR                   S3[%        U	5      5      n
[        U
5      U	eS n	A	ff = f)	NÚskip_parameter_validationÚselfÚcls)r,   )rW   zparameter of \w+ must bezparameter of z must be)r   r   ÚbindÚapply_defaultsÚ
parametersÚvaluesÚkindÚVAR_POSITIONALÚVAR_KEYWORDÚnameÚ	argumentsr#   r3   r   r   r   ÚreÚsubr)   )ÚargsÚkwargsÚglobal_skip_validationÚfunc_sigr+   ÚpÚ	to_ignoreÚkÚvÚeÚmsgÚfuncr*   Úprefer_skip_nested_validations              €€€r   ÚwrapperÚ3validate_params.<locals>.decorator.<locals>.wrapper»   s‡  ø€ ä%/£\Ð2MÑ%NÐ"Þ%Ù˜TÐ, VÑ,Ð,ä  “ˆHð —]’] DÐ3¨FÑ3ˆFØ×!Ñ!Ô#ð
 "×,Ñ,×3Ñ3Ô5óâ5�AØ—6‘6˜a×.Ñ.°·±Ð>Ñ>ó �—”Ù5ð ð ð
 ˜& %˜Ñ(ˆIØ'-×'7Ñ'7×'=Ñ'=Ô'?ÔVÒ'?™t˜qÀ1ÑCU“d�a’dÑ'?ˆFÑVä*Ø% v¸4×;LÑ;Lòð8Ü#à5×OÐ9Oóñ
   Ð0¨Ñ0÷ñ ùòùó W÷õ ûô )ó 
8ô
 —f’fØ/Ø# D×$5Ñ$5Ð#6°hÐ?Ü˜“Fó�ô
 ,¨CÓ0°aÐ7ûð
8úsN   Á'*DÂDÃD"ÃD"Ã9D9 ÄD(Ä	D9 Ä(
D6Ä2D9 Ä6D9 Ä9
FÅ;E>Å>F)ÚsetattrÚ	functoolsÚwraps)ro   rq   r*   rp   s   ` €€r   Ú	decoratorÚ"validate_params.<locals>.decoratorµ   s6   ù€ ô 	�Ð2Ð4IÔJä	�Š˜Ó	ö)	8ó 
ð)	8ðV ˆr   r   )r*   rp   rv   s   `` r   Úvalidate_paramsrx   –   s   ù€ ö>2ðh Ðr   c                   ó   • \ rS rSrSrSrg)Ú
RealNotIntéì   zÏA type that represents reals that are not instances of int.

Behaves like float, but also works with values extracted from numpy arrays.
isintance(1, RealNotInt) -> False
isinstance(1.0, RealNotInt) -> True
r   Nr   r   r   r   rz   rz   ì   s   † ôr   rz   c                 ó|   • U R                   nU R                  nUS:X  a  U$ U [        :X  a  gU [        :X  a  gU SU 3$ )z(Convert type into human readable string.ÚbuiltinsrM   ÚintÚ.)r   r   r   r   )ÚtÚmoduleÚqualnames      r   Ú
_type_namerƒ   ø   sF   € à�\‰\€FØ�~‰~€HØ�ÓØˆØ	
Œd‹ØØ	
Œh‹ØØˆX�Q�x�jÐ!Ð!r   c                   ó>   • \ rS rSrSrS r\S 5       r\S 5       rSr	g)Ú_Constrainti  z&Base class for the constraint objects.c                 ó   • SU l         g ©NF©r&   ©rX   s    r   Ú__init__Ú_Constraint.__init__  s	   € Øˆ�r   c                 ó   • g)zÐWhether or not a value satisfies the constraint.

Parameters
----------
val : object
    The value to check.

Returns
-------
is_satisfied : bool
    Whether or not the constraint is satisfied by this value.
Nr   ©rX   Úvals     r   r%   Ú_Constraint.is_satisfied_by  ó   � r   c                 ó   • g)z;A human readable representational string of the constraint.Nr   r‰   s    r   Ú__str__Ú_Constraint.__str__  r�   r   rˆ   N)
r   r   r   r   r   rŠ   r   r%   r’   r   r   r   r   r…   r…     s4   † Ù0òð ñó ðð ñJó óJr   r…   c                   ó8   ^ • \ rS rSrSrU 4S jrS rS rSrU =r	$ )rC   i  zjConstraint representing instances of a given type.

Parameters
----------
type : type
    The valid type.
c                 ó.   >• [         TU ]  5         Xl        g ©N)ÚsuperrŠ   rB   )rX   rB   Ú	__class__s     €r   rŠ   Ú_InstancesOf.__init__(  s   ø€ Ü‰ÑÔØ�	r   c                 ó,   • [        XR                  5      $ r–   ©r;   rB   r�   s     r   r%   Ú_InstancesOf.is_satisfied_by,  s   € Ü˜#Ÿy™yÓ)Ð)r   c                 ó4   • S[        U R                  5      < 3$ )Nzan instance of )rƒ   rB   r‰   s    r   r’   Ú_InstancesOf.__str__/  s   € Ø ¤¨D¯I©IÓ!6Ñ 9Ð:Ð:r   )rB   ©
r   r   r   r   r   rŠ   r%   r’   r   Ú__classcell__©r˜   s   @r   rC   rC     s   ø† ñõò*÷;ð ;r   rC   c                   ó$   • \ rS rSrSrS rS rSrg)rA   i3  z+Constraint representing the None singleton.c                 ó
   • US L $ r–   r   r�   s     r   r%   Ú_NoneConstraint.is_satisfied_by6  s   € Ø�dˆ{Ðr   c                 ó   • g)NÚNoner   r‰   s    r   r’   Ú_NoneConstraint.__str__9  s   € Ør   r   N©r   r   r   r   r   r%   r’   r   r   r   r   rA   rA   3  s   † Ù5òõr   rA   c                   ó$   • \ rS rSrSrS rS rSrg)rP   i=  z/Constraint representing the indicator `np.nan`.c                 ó”   • [        U[        5      (       + =(       a-    [        U[        5      =(       a    [        R                  " U5      $ r–   )r;   r   r   ÚmathrO   r�   s     r   r%   Ú_NanConstraint.is_satisfied_by@  s.   € ä˜3¤Ó)Ô)×W¬j¸¼dÓ.C×WÌÏ
Ê
ÐSVËð	
r   c                 ó   • g)Nz	numpy.nanr   r‰   s    r   r’   Ú_NanConstraint.__str__E  ó   € Ør   r   Nr¨   r   r   r   rP   rP   =  s   † Ù9ò
õ
r   rP   c                   ó$   • \ rS rSrSrS rS rSrg)Ú_PandasNAConstraintiI  z.Constraint representing the indicator `pd.NA`.c                 óš   •  SS K n[        U[        UR                  5      5      =(       a    UR	                  U5      $ ! [
         a     gf = f)Nr   F)Úpandasr;   rB   ÚNAÚisnaÚImportError)rX   rŽ   Úpds      r   r%   Ú#_PandasNAConstraint.is_satisfied_byL  s>   € ð	Ûä˜c¤4¨¯©£;Ó/×@°B·G±G¸C³LÐ@øÜó 	Ùð	ús   ‚:= ½
A
Á	A
c                 ó   • g)Nz	pandas.NAr   r‰   s    r   r’   Ú_PandasNAConstraint.__str__T  r¯   r   r   Nr¨   r   r   r   r±   r±   I  s   † Ù8òõr   r±   c                   óF   ^ • \ rS rSrSrSS.U 4S jjrS rS rS rS	r	U =r
$ )
rF   iX  a#  Constraint representing a finite set of instances of a given type.

Parameters
----------
type : type

options : set
    The set of valid scalars.

deprecated : set or None, default=None
    A subset of the `options` to mark as deprecated in the string
    representation of the constraint.
N©Ú
deprecatedc                ó¼   >• [         TU ]  5         Xl        X l        U=(       d
    [	        5       U l        U R
                  U R                  -
  (       a  [        S5      eg )Nz7The deprecated options must be a subset of the options.)r—   rŠ   rB   ÚoptionsÚsetr½   rQ   )rX   rB   r¿   r½   r˜   s       €r   rŠ   ÚOptions.__init__g  sG   ø€ Ü‰ÑÔØŒ	ØŒØ$×-¬«ˆŒà�?‰?˜TŸ\™\×)ÜÐVÓWÐWð *r   c                 óV   • [        XR                  5      =(       a    XR                  ;   $ r–   )r;   rB   r¿   r�   s     r   r%   ÚOptions.is_satisfied_byp  s   € Ü˜#Ÿy™yÓ)×A¨c·\±\Ñ.AÐAr   c                 ó6   • U< nXR                   ;   a  U S3nU$ )z-Add a deprecated mark to an option if needed.z (deprecated)r¼   )rX   ÚoptionÚ
option_strs      r   Ú_mark_if_deprecatedÚOptions._mark_if_deprecateds  s%   € à‘zˆ
Ø—_‘_Ó$Ø&˜< }Ð5ˆJØÐr   c                 óº   • SR                  U R                   Vs/ s H  oR                  U5      PM     sn5       nS[        U R                  5       SU S3$ s  snf )Nr   za z among {Ú})r(   r¿   rÇ   rƒ   rB   )rX   ÚoÚoptions_strs      r   r’   ÚOptions.__str__z  sY   € à�y‰y¸t¿|º|ÓLº|¸!×2Ñ2°1Ö5¹|ÑLÓMÐNð 	ð ”J˜tŸy™yÓ)Ð*¨)°K°=ÀÐCÐCùò Ms   šA)r½   r¿   rB   )r   r   r   r   r   rŠ   r%   rÇ   r’   r   r    r¡   s   @r   rF   rF   X  s0   ø† ñð 59÷ Xð XòBò÷Dð Dr   rF   c                   ó4   ^ • \ rS rSrSrSS.U 4S jjrSrU =r$ )rE   i�  a  Constraint representing a finite set of strings.

Parameters
----------
options : set of str
    The set of valid strings.

deprecated : set of str or None, default=None
    A subset of the `options` to mark as deprecated in the string
    representation of the constraint.
Nr¼   c                ó*   >• [         TU ]  [        XS9  g )N)rB   r¿   r½   )r—   rŠ   r)   )rX   r¿   r½   r˜   s      €r   rŠ   ÚStrOptions.__init__Ž  s   ø€ Ü‰Ñœc¨7ÐÒJr   r   )r   r   r   r   r   rŠ   r   r    r¡   s   @r   rE   rE   �  s   ø† ñ
ð /3÷ Kö Kr   rE   c                   óD   ^ • \ rS rSrSrU 4S jrS rS rS rS r	Sr
U =r$ )	rD   i’  uå  Constraint representing a typed interval.

Parameters
----------
type : {numbers.Integral, numbers.Real, RealNotInt}
    The set of numbers in which to set the interval.

    If RealNotInt, only reals that don't have the integer type
    are allowed. For example 1.0 is allowed but 1 is not.

left : float or int or None
    The left bound of the interval. None means left bound is -âˆž.

right : float, int or None
    The right bound of the interval. None means right bound is +âˆž.

closed : {"left", "right", "both", "neither"}
    Whether the interval is open or closed. Possible choices are:

    - `"left"`: the interval is closed on the left and open on the right.
      It is equivalent to the interval `[ left, right )`.
    - `"right"`: the interval is closed on the right and open on the left.
      It is equivalent to the interval `( left, right ]`.
    - `"both"`: the interval is closed.
      It is equivalent to the interval `[ left, right ]`.
    - `"neither"`: the interval is open.
      It is equivalent to the interval `( left, right )`.

Notes
-----
Setting a bound to `None` and setting the interval closed is valid. For instance,
strictly speaking, `Interval(Real, 0, None, closed="both")` corresponds to
`[0, +âˆž) U {+âˆž}`.
c                ór   >• [         TU ]  5         Xl        X l        X0l        X@l        U R                  5         g r–   )r—   rŠ   rB   ÚleftÚrightÚclosedÚ_check_params)rX   rB   rÓ   rÔ   rÕ   r˜   s        €r   rŠ   ÚInterval.__init__¶  s.   ø€ Ü‰ÑÔØŒ	ØŒ	ØŒ
ØŒà×ÑÕr   c                 óL  • U R                   [        [        [        4;  a  [	        SU R                    S35      eU R
                  S;  a  [	        SU R
                   S35      eU R                   [        L aç  SnU R                  b-  [        U R                  [        5      (       d  [        SU 35      eU R                  b-  [        U R                  [        5      (       d  [        SU 35      eU R                  c+  U R
                  S;   a  [	        S	U R
                   S
U 35      eU R                  c+  U R
                  S;   a  [	        SU R
                   S
U 35      eOnU R                  b*  [        U R                  [        5      (       d  [        S5      eU R                  b*  [        U R                  [        5      (       d  [        S5      eU R                  bN  U R                  b@  U R                  U R                  ::  a%  [	        SU R                   SU R                   35      eg g g )NzFtype must be either numbers.Integral, numbers.Real or RealNotInt. Got r"   )rÓ   rÔ   ÚbothÚneitherz@closed must be either 'left', 'right', 'both' or 'neither'. Got z"for an interval over the integers.zExpecting left to be an int zExpecting right to be an int ©rÓ   rÙ   z"left can't be None when closed == Ú ©rÔ   rÙ   z#right can't be None when closed == z#Expecting left to be a real number.z$Expecting right to be a real number.z(right can't be less than left. Got left=z and right=)
rB   r   r   rz   rQ   rÕ   rÓ   r;   Ú	TypeErrorrÔ   )rX   Úsuffixs     r   rÖ   ÚInterval._check_params¿  sï  € Ø�9‰9œX¤t¬ZÐ8Ó8ÜðØŸ	™	�{ )ð-óð ð
 �;‰;ÐBÓBÜðØ—{‘{�m 9ð.óð ð
 �9‰9œÒ Ø9ˆFØ�y‰yÑ$¬Z¸¿	¹	Ä8×-LÑ-LÜÐ">¸v¸hÐ GÓHÐHØ�z‰zÑ%¬j¸¿¹ÄX×.NÑ.NÜÐ"?À¸xÐ HÓIÐIØ�y‰yÑ  T§[¡[Ð4DÓ%DÜ Ø8¸¿¹¸ÀQÀvÀhÐOóð ð �z‰zÑ! d§k¡kÐ5FÓ&FÜ Ø9¸$¿+¹+¸ÀaÈÀxÐPóð øð �y‰yÑ$¬Z¸¿	¹	Ä4×-HÑ-HÜÐ EÓFÐFØ�z‰zÑ%¬j¸¿¹ÄT×.JÑ.JÜÐ FÓGÐGà�:‰:Ñ! d§i¡iÑ&;ÀÇ
Á
ÈdÏiÉiÓ@WÜØ:¸4¿9¹9¸+ð FØŸ™˜ð&óð ð AXÐ&;Ð!r   c                 ó  • [        U[        5      (       d  [        R                  " U5      (       a  gU R                  S;   a  [
        R                  O[
        R                  nU R                  S;   a  [
        R                  O[
        R                  nU R                  c  [        R                  * OU R                  nU R                  c  [        R                  OU R                  nU" X5      (       a  gU" X5      (       a  gg)NFrÛ   rÝ   T)r;   r   rN   rO   rÕ   ÚoperatorÚltÚleÚgtÚgerÓ   ÚinfrÔ   )rX   rŽ   Úleft_cmpÚ	right_cmprÓ   rÔ   s         r   Ú__contains__ÚInterval.__contains__æ  s¥   € Ü˜#œx×(Ñ(¬R¯XªX°c¯]©]Øà"&§+¡+Ð1AÓ"A”8—;’;ÄxÇ{Á{ˆØ#'§;¡;Ð2CÓ#C”H—K’KÌÏÉˆ	àŸ)™)Ñ+”—‘‰w°·±ˆØŸ*™*Ñ,”—’°$·*±*ˆá�C×ÑØÙ�S× Ñ ØØr   c                 ó@   • [        XR                  5      (       d  gX;   $ r‡   r›   r�   s     r   r%   ÚInterval.is_satisfied_byö  s   € Ü˜#Ÿy™y×)Ñ)Øà‰{Ðr   c                 ó   • U R                   [        L a  SOSnU R                  S;   a  SOSnU R                  c  SOU R                  nU R                  c  SOU R                  nU R                  S;   a  S	OS
nU R                   [        :X  d*  [        U R                  [        5      (       a  [        U5      nU R                   [        :X  d*  [        U R                  [        5      (       a  [        U5      nU SU U SU U 3$ )Nzan intza floatrÛ   Ú[Ú(z-infrç   rÝ   Ú]Ú)z in the range r   )rB   r   rÕ   rÓ   rÔ   r;   r   rM   )rX   Útype_strÚleft_bracketÚ
left_boundÚright_boundÚright_brackets         r   r’   ÚInterval.__str__ü  s×   € Ø#Ÿy™y¬HÒ4‘8¸)ˆØ"Ÿk™kÐ-=Ó=‘sÀ3ˆØ#Ÿy™yÑ0‘V°d·i±iˆ
Ø#Ÿz™zÑ1‘e°t·z±zˆØ#Ÿ{™{Ð.?Ó?™ÀSˆð �y‰yœHÓ$¬°D·I±I¼t×)DÑ)DÜ˜zÓ*ˆJØ�y‰yœHÓ$¬°D·J±JÄ×)EÑ)EÜ Ó,ˆKð ˆj˜Øˆn˜Z˜L¨¨;¨-¸°ðHð	
r   )rÕ   rÓ   rÔ   rB   )r   r   r   r   r   rŠ   rÖ   rê   r%   r’   r   r    r¡   s   @r   rD   rD   ’  s(   ø† ñ!õFò%òNò ÷
ð 
r   rD   c                   ó$   • \ rS rSrSrS rS rSrg)r<   i  z#Constraint representing array-likesc                 ó   • [        U5      $ r–   r   r�   s     r   r%   Ú_ArrayLikes.is_satisfied_by  s   € Ü'¨Ó,Ð,r   c                 ó   • g)Nzan array-liker   r‰   s    r   r’   Ú_ArrayLikes.__str__  s   € Ør   r   Nr¨   r   r   r   r<   r<     s   † Ù-ò-õr   r<   c                   ó$   • \ rS rSrSrS rS rSrg)r=   i  z(Constraint representing sparse matrices.c                 ó   • [        U5      $ r–   )r
   r�   s     r   r%   Ú_SparseMatrices.is_satisfied_by  ó   € Ü˜‹}Ðr   c                 ó   • g)Nza sparse matrixr   r‰   s    r   r’   Ú_SparseMatrices.__str__  s   € Ø r   r   Nr¨   r   r   r   r=   r=     s   † Ù2òõ!r   r=   c                   ó$   • \ rS rSrSrS rS rSrg)r@   i#  z"Constraint representing callables.c                 ó   • [        U5      $ r–   )r?   r�   s     r   r%   Ú_Callables.is_satisfied_by&  r  r   c                 ó   • g)Nz
a callabler   r‰   s    r   r’   Ú_Callables.__str__)  s   € Ør   r   Nr¨   r   r   r   r@   r@   #  s   † Ù,òõr   r@   c                   ó8   ^ • \ rS rSrSrU 4S jrS rS rSrU =r	$ )r>   i-  z�Constraint representing random states.

Convenience class for
[Interval(Integral, 0, 2**32 - 1, closed="both"), np.random.RandomState, None]
c                 ó¤   >• [         TU ]  5         [        [        SSSS9[	        [
        R                  R                  5      [        5       /U l	        g )Nr   l   ÿÿ rÙ   ©rÕ   )
r—   rŠ   rD   r   rC   rN   ÚrandomÚRandomStaterA   Ú_constraints©rX   r˜   s    €r   rŠ   Ú_RandomStates.__init__4  s>   ø€ Ü‰ÑÔä”X˜q )°FÑ;ÜœŸ™×.Ñ.Ó/ÜÓð
ˆÕr   c                 óB   ^• [        U4S jU R                   5       5      $ )Nc              3   óD   >#   • U  H  oR                  T5      v •  M     g 7fr–   ©r%   ©Ú.0r2   rŽ   s     €r   Ú	<genexpr>Ú0_RandomStates.is_satisfied_by.<locals>.<genexpr>=  ó   øé € ÐEÒ3D¨a×$Ñ$ S×)Ð)Ò3Dùó   ƒ ©Úanyr  r�   s    `r   r%   Ú_RandomStates.is_satisfied_by<  ó   ø€ ÜÔE°4×3DÒ3DÓEÓEÐEr   c                 ó    • SR                  U R                  S S  Vs/ s H  n[        U5      PM     sn5       SU R                  S    3$ s  snf ©Nr   r    r!   ©r(   r  r)   ©rX   r2   s     r   r’   Ú_RandomStates.__str__?  óW   € à�y‰y¨$×*;Ñ*;¸C¸RÑ*@ÓAÒ*@ Qœ#˜až&Ñ*@ÑAÓBÐCð DØ×!Ñ! "Ñ%Ð&ð(ð	
ùÚAó   �A©r  rŸ   r¡   s   @r   r>   r>   -  ó   ø† ñõ
òF÷
ð 
r   r>   c                   ó8   ^ • \ rS rSrSrU 4S jrS rS rSrU =r	$ )rI   iF  zOConstraint representing boolean likes.

Convenience class for
[bool, np.bool_]
c                 ó|   >• [         TU ]  5         [        [        5      [        [        R
                  5      /U l        g r–   )r—   rŠ   rC   ÚboolrN   Úbool_r  r  s    €r   rŠ   Ú_Booleans.__init__M  s,   ø€ Ü‰ÑÔäœÓÜœŸ™Ó"ð
ˆÕr   c                 óB   ^• [        U4S jU R                   5       5      $ )Nc              3   óD   >#   • U  H  oR                  T5      v •  M     g 7fr–   r  r  s     €r   r  Ú,_Booleans.is_satisfied_by.<locals>.<genexpr>U  r  r  r  r�   s    `r   r%   Ú_Booleans.is_satisfied_byT  r  r   c                 ó    • SR                  U R                  S S  Vs/ s H  n[        U5      PM     sn5       SU R                  S    3$ s  snf r  r   r!  s     r   r’   Ú_Booleans.__str__W  r#  r$  r%  rŸ   r¡   s   @r   rI   rI   F  s   ø† ñõ
òF÷
ð 
r   rI   c                   ó8   ^ • \ rS rSrSrU 4S jrS rS rSrU =r	$ )rJ   i^  z„Helper constraint for the verbose parameter.

Convenience class for
[Interval(Integral, 0, None, closed="left"), bool, numpy.bool_]
c                 óš   >• [         TU ]  5         [        [        SS SS9[	        [
        5      [	        [        R                  5      /U l        g )Nr   rÓ   r  )	r—   rŠ   rD   r   rC   r)  rN   r*  r  r  s    €r   rŠ   Ú_VerboseHelper.__init__e  s:   ø€ Ü‰ÑÔä”X˜q $¨vÑ6ÜœÓÜœŸ™Ó"ð
ˆÕr   c                 óB   ^• [        U4S jU R                   5       5      $ )Nc              3   óD   >#   • U  H  oR                  T5      v •  M     g 7fr–   r  r  s     €r   r  Ú1_VerboseHelper.is_satisfied_by.<locals>.<genexpr>n  r  r  r  r�   s    `r   r%   Ú_VerboseHelper.is_satisfied_bym  r  r   c                 ó    • SR                  U R                  S S  Vs/ s H  n[        U5      PM     sn5       SU R                  S    3$ s  snf r  r   r!  s     r   r’   Ú_VerboseHelper.__str__p  r#  r$  r%  rŸ   r¡   s   @r   rJ   rJ   ^  r&  r   rJ   c                   ó<   ^ • \ rS rSrSrSU 4S jjrS rS rSrU =r	$ )rH   iw  a�  Helper constraint for the `missing_values` parameters.

Convenience for
[
    Integral,
    Interval(Real, None, None, closed="both"),
    str,   # when numeric_only is False
    None,  # when numeric_only is False
    _NanConstraint(),
    _PandasNAConstraint(),
]

Parameters
----------
numeric_only : bool, default=False
    Whether to consider only numeric missing value markers.

c                 ó"  >• [         TU ]  5         Xl        [        [        5      [        [        S S SS9[        5       [        5       /U l	        U R                  (       d3  U R                  R                  [        [        5      [        5       /5        g g )NrÙ   r  )r—   rŠ   Únumeric_onlyrC   r   rD   r   rP   r±   r  Úextendr)   rA   )rX   r=  r˜   s     €r   rŠ   ÚMissingValues.__init__‹  ss   ø€ Ü‰ÑÔà(Ôô œÓ"ä”T˜4 ¨fÑ5ÜÓÜÓ!ð
ˆÔð × × Ø×Ñ×$Ñ$¤l´3Ó&7¼Ó9JÐ%KÕLð !r   c                 óB   ^• [        U4S jU R                   5       5      $ )Nc              3   óD   >#   • U  H  oR                  T5      v •  M     g 7fr–   r  r  s     €r   r  Ú0MissingValues.is_satisfied_by.<locals>.<genexpr>›  r  r  r  r�   s    `r   r%   ÚMissingValues.is_satisfied_byš  r  r   c                 ó    • SR                  U R                  S S  Vs/ s H  n[        U5      PM     sn5       SU R                  S    3$ s  snf r  r   r!  s     r   r’   ÚMissingValues.__str__�  r#  r$  )r  r=  )FrŸ   r¡   s   @r   rH   rH   w  s   ø† ñ÷&MòF÷
ð 
r   rH   c                   óT   ^ • \ rS rSrSr\" S\\/0SS9U 4S j5       rS r	S r
S	rU =r$ )
rG   i¤  a-  Constraint representing objects that expose specific methods.

It is useful for parameters following a protocol and where we don't want to impose
an affiliation to a specific module or class.

Parameters
----------
methods : str or list of str
    The method(s) that the object is expected to expose.
ÚmethodsT)rp   c                 ó^   >• [         TU ]  5         [        U[        5      (       a  U/nXl        g r–   )r—   rŠ   r;   r)   rG  )rX   rG  r˜   s     €r   rŠ   ÚHasMethods.__init__°  s)   ø€ ô
 	‰ÑÔÜ�gœs×#Ñ#Ø�iˆGØ�r   c                 óB   ^• [        U4S jU R                   5       5      $ )Nc              3   óP   >#   • U  H  n[        [        TUS 5      5      v •  M     g 7fr–   )r?   Úgetattr)r  ÚmethodrŽ   s     €r   r  Ú-HasMethods.is_satisfied_by.<locals>.<genexpr>»  s"   øé € ÐSÂl¸F”8œG C¨°Ó6×7Ð7Âlùs   ƒ#&)ÚallrG  r�   s    `r   r%   ÚHasMethods.is_satisfied_byº  s   ø€ ÜÔSÀdÇlÂlÓSÓSÐSr   c                 ó  • [        U R                  5      S:X  a  U R                  S   < nOKSR                  U R                  S S  Vs/ s H  n[        U5      PM     sn5       SU R                  S   < 3nSU 3$ s  snf )Nr   r   r   r    z and zan object implementing )r'   rG  r(   Úrepr)rX   rG  Úms      r   r’   ÚHasMethods.__str__½  sˆ   € Üˆt�|‰|Ó Ó!ØŸ™ a™Ñ+‰Gð —9‘9¨t¯|©|¸C¸RÑ/@ÓAÒ/@¨!œd 1žgÑ/@ÑAÓBÐCð DØ—L‘L Ñ$Ñ'ð)ð ð )¨¨	Ð2Ð2ùò Bs   ÁA<)rG  )r   r   r   r   r   rx   r)   ÚlistrŠ   r%   r’   r   r    r¡   s   @r   rG   rG   ¤  s@   ø† ñ	ñ Ø	�S˜$�KÐ Ø&*ñôó	ðòT÷3ð 3r   rG   c                   ó$   • \ rS rSrSrS rS rSrg)Ú_IterablesNotStringiÈ  z7Constraint representing iterables that are not strings.c                 óZ   • [        U[        5      =(       a    [        U[        5      (       + $ r–   )r;   r   r)   r�   s     r   r%   Ú#_IterablesNotString.is_satisfied_byË  s   € Ü˜#œxÓ(×E´¸CÄÓ1EÔ-EÐEr   c                 ó   • g)Nzan iterabler   r‰   s    r   r’   Ú_IterablesNotString.__str__Î  s   € Ør   r   Nr¨   r   r   r   rW  rW  È  s   † ÙAòFõr   rW  c                   ó8   ^ • \ rS rSrSrU 4S jrS rS rSrU =r	$ )rK   iÒ  z¾Constraint representing cv objects.

Convenient class for
[
    Interval(Integral, 2, None, closed="left"),
    HasMethods(["split", "get_n_splits"]),
    _IterablesNotString(),
    None,
]
c                 óŠ   >• [         TU ]  5         [        [        SS SS9[	        SS/5      [        5       [        5       /U l        g )Né   rÓ   r  ÚsplitÚget_n_splits)r—   rŠ   rD   r   rG   rW  rA   r  r  s    €r   rŠ   Ú_CVObjects.__init__Þ  s?   ø€ Ü‰ÑÔä”X˜q $¨vÑ6Ü˜ Ð0Ó1ÜÓ!ÜÓð	
ˆÕr   c                 óB   ^• [        U4S jU R                   5       5      $ )Nc              3   óD   >#   • U  H  oR                  T5      v •  M     g 7fr–   r  r  s     €r   r  Ú-_CVObjects.is_satisfied_by.<locals>.<genexpr>è  r  r  r  r�   s    `r   r%   Ú_CVObjects.is_satisfied_byç  r  r   c                 ó    • SR                  U R                  S S  Vs/ s H  n[        U5      PM     sn5       SU R                  S    3$ s  snf r  r   r!  s     r   r’   Ú_CVObjects.__str__ê  r#  r$  r%  rŸ   r¡   s   @r   rK   rK   Ò  s   ø† ñ	õ
òF÷
ð 
r   rK   c                   ó   • \ rS rSrSrS rSrg)rL   iñ  z°Class encapsulating a constraint not meant to be exposed to the user.

Parameters
----------
constraint : str or _Constraint instance
    The constraint to be used internally.
c                 ó   • Xl         g r–   rR   )rX   r0   s     r   rŠ   ÚHidden.__init__ú  s   € Ø$�r   rR   N)r   r   r   r   r   rŠ   r   r   r   r   rL   rL   ñ  s   † ñõ%r   rL   c                 óÜ  • [        U [        5      (       a  SSR                  U R                  5       3$ [        U [        5      (       a  [
        R                  " / SQ5      $ [        U [        5      (       a  g[        U [        5      (       a  [        SS0 5      " 5       $ [        U [        5      (       a  g[        U [        5      (       a  g[        U [        5      (       aQ  U R                  [        L a>  U R                  b  U R                  S	-
  $ U R                  b  U R                  S	-   $ [         e[        U [        5      (       a£  U R                  ["        [$        4;   a‰  U R                  b  U R                  S
-
  $ U R                  b  U R                  S
-   $ U R&                  S;   a  [
        R(                  * $ U R&                  S;   a  [
        R(                  $ [
        R*                  $ [         e)ah  Return a value that does not satisfy the constraint.

Raises a NotImplementedError if there exists no invalid value for this constraint.

This is only useful for testing purpose.

Parameters
----------
constraint : _Constraint instance
    The constraint to generate a value for.

Returns
-------
val : object
    A value that does not satisfy the constraint.
znot r!   ©r   r^  é   r    ÚHasNotMethodsr   za stringznot a cv objectr   g�íµ ÷Æ°>)rÔ   rÚ   )rÓ   rÚ   )r;   rE   r(   r¿   rH   rN   ÚarrayrJ   rG   rB   rW  rK   rD   r   rÓ   rÔ   ÚNotImplementedErrorr   rz   rÕ   rç   r9   rR   s    r   Úgenerate_invalid_param_valrq  þ  sˆ  € ô" �*œj×)Ñ)Ø�f—k‘k *×"4Ñ"4Ó5Ð6Ð7Ð7ä�*œm×,Ñ,Ü�xŠxš	Ó"Ð"ä�*œn×-Ñ-Øä�*œj×)Ñ)Ü�O R¨Ô,Ó.Ð.ä�*Ô1×2Ñ2Øä�*œj×)Ñ)Ø ä�*œh×'Ñ'¨J¯O©O¼xÒ,GØ�?‰?Ñ&Ø—?‘? QÑ&Ð&Ø×ÑÑ'Ø×#Ñ# aÑ'Ð'ô "Ð!ä�*œh×'Ñ'¨J¯O©OÄÄjÐ?QÓ,QØ�?‰?Ñ&Ø—?‘? TÑ)Ð)Ø×ÑÑ'Ø×#Ñ# dÑ*Ð*ð ×ÑÐ 4Ó4Ü—F‘F�7ˆNØ×ÑÐ 3Ó3Ü—6‘6ˆMô �v‰vˆä
Ðr   c           	      ó  • [        U [        5      (       a  [        R                  " / SQ5      $ [        U [        5      (       a  [        SS/SS//5      $ [        U [        5      (       a  [        R                  R                  S5      $ [        U [        5      (       a  S $ [        U [        5      (       a  g[        U [        5      (       a`  U R                  [        R                  L a  [        R                  " / SQ5      $ U R                  [        [        4;   a  gU R                  5       $ [        U [         5      (       a  g[        U ["        5      (       a  g[        U [$        5      (       a!  U R&                  (       a  [        R(                  $ [        U [$        5      (       a  U R&                  (       d  g[        U [*        5      (       a.  [        S	S
U R,                   Vs0 s H  oS _M     sn5      " 5       $ [        U [.        5      (       a  / SQ$ [        U [0        5      (       a  g[        U [2        5      (       a  U R4                   H  nUs  $    [        U [6        5      (       a“  U nUR8                  c  UR:                  c  gUR8                  c  UR:                  S-
  $ UR:                  c  UR8                  S-   $ UR                  [        L a  UR8                  UR:                  -   S-  $ UR8                  S-   $ [=        SU  35      es  snf )a	  Return a value that does satisfy a constraint.

This is only useful for testing purpose.

Parameters
----------
constraint : Constraint instance
    The constraint to generate a value for.

Returns
-------
val : object
    A value that does satisfy the constraint.
rl  r   r   é*   c                 ó   • U $ r–   r   )Úxs    r   Ú<lambda>Ú&generate_valid_param.<locals>.<lambda>U  s   € ™r   NTÚmissingÚValidHasMethodsr   c                 ó   • g r–   r   r‰   s    r   rv  rw  s  s   € °Dr   é   r^  r:   )r;   r<   rN   ro  r=   r	   r>   r  r  r@   rA   rC   rB   Úndarrayr   r   rI   rJ   rH   r=  r9   rG   rG  rW  rK   rF   r¿   rD   rÓ   rÔ   rQ   )r0   rS  rÅ   Úintervals       r   Úgenerate_valid_paramr~  <  s^  € ô �*œk×*Ñ*Ü�xŠxš	Ó"Ð"ä�*œo×.Ñ.Ü˜A˜q˜6 A q 6Ð*Ó+Ð+ä�*œm×,Ñ,Ü�y‰y×$Ñ$ RÓ(Ð(ä�*œj×)Ñ)ÙÐä�*œo×.Ñ.Øä�*œl×+Ñ+Ø�?‰?œbŸj™jÒ(ä—8’8šIÓ&Ð&à�?‰?œx¬Ð.Ó.àà�‰Ó Ð ä�*œi×(Ñ(Øä�*œn×-Ñ-Øä�*œm×,Ñ,°×1H×1HÜ�v‰vˆä�*œm×,Ñ,°Z×5L×5LØä�*œj×)Ñ)ÜØ˜rÀ*×BTÒBTÓ#UÒBT¸QÑ'8Ò$8ÑBTÑ#Uô
ó ð 	ô �*Ô1×2Ñ2ÚÐä�*œj×)Ñ)Øä�*œg×&Ñ&Ø ×(Ô(ˆFØŠMñ )ô �*œh×'Ñ'ØˆØ�=‰=Ñ  X§^¡^Ñ%;ØØ�]‰]Ñ"Ø—>‘> AÑ%Ð%Ø�^‰^Ñ#Ø—=‘= 1Ñ$Ð$à�}‰}¤Ò$Ø Ÿ™¨¯©Ñ6¸!Ñ;Ð;à—}‘} qÑ(Ð(ä
Ð0°°Ð=Ó
>Ð>ùò7 $Vs   ÇL)7rt   r«   râ   rc   Úabcr   r   Úcollections.abcr   Úinspectr   Únumbersr   r   ÚnumpyrN   Úscipy.sparser	   r
   Úsklearn._configr   r   Úsklearn.utils.validationr   rQ   rÞ   r   r3   r$   rx   rz   ÚregisterrM   rƒ   r…   rC   rA   rP   r±   rF   rE   rD   r<   r=   r@   r>   rI   rJ   rH   rG   rW  rK   rL   rq  r~  r   r   r   Ú<module>rˆ     sh  ðó Û Û Û 	ß #Ý $Ý ß "ã ß -ç 6Ý =ô˜J¨	ô òIòX+?ò\Sôl�ô ð × Ñ �EÔ ò
"ôJ�#ô Jô4;�;ô ;ô(�kô ô	�[ô 	ô˜+ô ô&Dˆkô &DôRK�ô Kô"z
ˆ{ô z
ôz�+ô ô!�kô !ô�ô ô
�Kô 
ô2
�ô 
ô0
�[ô 
ô2*
�Kô *
ôZ!3�ô !3ôH˜+ô ô
�ô 
÷>
%ñ 
%ò;ó|R?r   