Ë
    ®Ó^j^	  ã                   ó¼   — d Z ddlZddlmZmZ ddlmZmZ ddlZ	ddl
mZmZmZmZ ddlmZmZ ddlmZ erdd	lmZ  G d
„ de«      Z G d„ de«      Zdededefd„Zy)zÅExperimental support for a new objective interface with target dimension
reduction.

.. warning::

  Do not use this module unless you want to participate in development.

.. versionadded:: 3.2.0

é    N)ÚABCÚabstractmethod)ÚTYPE_CHECKINGÚTupleé   )Ú_ensure_np_dtypeÚ_is_flattenÚarray_interfaceÚcuda_array_interface)Ú	ArrayLikeÚNumpyOrCupy)Ú_is_cupy_alike)ÚDMatrixc                   ó<   — e Zd ZdZedededddeeef   fd„«       Zy)	Ú	Objectivez­Base class for custom objective functions.

    .. warning::

        Do not use this class unless you want to participate in development.

    .. versionadded:: 3.2.0

    Ú	iterationÚy_predÚdtrainr   Úreturnc                  ó   — y )N© )Úselfr   r   r   s       ú\/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/xgboost/objective.pyÚ__call__zObjective.__call__*   s   € ð '*ó    N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úintr   r   r   r   r   r   r   r      sE   „ ñð ð*Øð*Ø&/ð*Ø9Bð*à	ˆy˜)Ð#Ñ	$ò*ó ñ*r   r   c            
       ó8   — e Zd ZdZdedededeeef   dz  fd„Zy)ÚTreeObjectivez»Base class for tree-specific custom objective functions.

    .. warning::

        Do not use this class unless you want to participate in development.

    .. versionadded:: 3.2.0

    r   ÚgradÚhessr   Nc                  ó   — y)z>Provide a different gradient type for finding tree structures.Nr   )r   r   r#   r$   s       r   Ú
split_gradzTreeObjective.split_grad<   s   € ð r   )r   r   r   r   r    r   r   r&   r   r   r   r"   r"   0   s;   „ ñðØðØ$-ðØ5>ðà	ˆy˜)Ð#Ñ	$ tÑ	+ôr   r"   ÚarrayÚ	n_samplesr   c                 óð  — dt        | «      › �}t        | t        j                  «      st	        | «      st        |«      ‚| j                  d   |k7  rDt        | «      r9t        j                  dt        «       | j                  || j                  |z  «      } t        | t        j                  «      r&t        | | j                  «      \  } }t        | «      }|S t	        | «      rt!        | «      }|S t        |«      ‚)NzHExpecting `np.ndarray` or `cupy.ndarray` for gradient and hessian. Got: r   zvSince 2.1.0, the shape of the gradient and hessian is required to be (n_samples, n_targets) or (n_samples, n_classes).)ÚtypeÚ
isinstanceÚnpÚndarrayr   Ú	TypeErrorÚshaper	   ÚwarningsÚwarnÚFutureWarningÚreshapeÚsizer   Údtyper
   r   )r'   r(   ÚmsgÚ_Ú	interfaces        r   Ú_grad_arrinfr9   C   sÞ   € ð	Ü�e“�ð	ð ô �eœRŸZ™ZÔ(´ÀÔ1FÜ˜‹nÐà‡{�{�1�~˜Ò"¤{°5Ô'9Ü�‰ðDäô	
ð
 —‘˜i¨¯©°yÑ)@ÓAˆä�%œŸ™Ô$Ü# E¨5¯;©;Ó7‰ˆˆqÜ# EÓ*ˆ	ð Ðô 
˜Ô	Ü(¨Ó/ˆ	ð Ðô ˜‹nÐr   )r   r0   Úabcr   r   Útypingr   r   Únumpyr,   Ú_data_utilsr   r	   r
   r   Ú_typingr   r   Úcompatr   Úcorer   r   r"   r    Úbytesr9   r   r   r   ú<module>rB      sb   ðñ	ó ß #ß 'ã ÷ó ÷ ,Ý "áÝô*�ô *ô"�Iô ð&˜ð °ð ¸ô r   