
    siiu                     T    d Z ddlmZmZ ddlmZmZ e G d d                      ZdS )z/Xgboost training summary integration submodule.    )	dataclassfield)DictListc                       e Zd ZU dZ ee          Zeee	e
         f         ed<    ee          Zeee	e
         f         ed<   edeeeee	e
         f         f         dd fd            ZdS )	XGBoostTrainingSummaryz
    A class that holds the training and validation objective history
    of an XGBoost model during its training process.
    )default_factorytrain_objective_historyvalidation_objective_historymetricsreturnc                 z    |                      di           }|                      di           }t          ||          S )a  
        Create an XGBoostTrainingSummary instance from a nested dictionary of metrics.

        Parameters
        ----------
        metrics : dict of str to dict of str to list of float
            A dictionary containing training and validation metrics.
            Example format:
                {
                    "training": {"logloss": [0.1, 0.08]},
                    "validation": {"logloss": [0.12, 0.1]}
                }

        Returns
        -------
        A new instance of XGBoostTrainingSummary.

        training
validation)getr   )r   r
   r   s      [/var/www/html/bet.cuttalo.com/ml/venv/lib/python3.11/site-packages/xgboost/spark/summary.pyfrom_metricsz#XGBoostTrainingSummary.from_metrics   sD    , #*++j""="='.{{<'D'D$%#%A
 
 	
    N)__name__
__module____qualname____doc__r   dictr
   r   strr   float__annotations__r   staticmethodr    r   r   r   r      s          
 7<eD6Q6Q6QT#tE{"23QQQ;@5QU;V;V;V $sDK'7"8VVV
c4T%[ 0112
	!
 
 
 \
 
 
r   r   N)r   dataclassesr   r   typingr   r   r   r   r   r   <module>r!      sy    5 5 ( ( ( ( ( ( ( (         #
 #
 #
 #
 #
 #
 #
 #
 #
 #
r   