§
    ’©ºj\  ã                   óB  — d dl mZmZmZ d dlZd dlmZ d dlmZ d dlm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZ d dlmZ d dlmZ d dlmZ d d	lmZ 	 	 d'deeee         f         deeee         f         deed                  dee         def
d„Z deee!eef         f         dee         defd„Z"	 	 	 d(dededeee#e$e%         ef                  dee#         de&defd„Z'	 	 	 d)de#deed                  deee#e$e%         ef                  dee#         ddf
d„Z(	 	 d'deee!eef         f         de#deed                  dee         def
d„Z)	 	 	 	 d*dedede#deed                  deee#e$e%         ef                  dee#         de&defd„Z*	 	 d+de#deed                   deee#e$e%         ef                  dee#         ddf
d!„Z+	 d,deee!eef         f         de#deed                   dee         dee#         defd"„Z,	 	 	 	 d*dedede#deed                   deee#e$e%         ef                  dee#         de&defd#„Z-	 	 	 	 	 	 d-deded$ed%         deee#e$e%         ef                  dee#         dee#         deed                  dee#         de&dee         fd&„Z.dS ).é    )ÚListÚOptionalÚUnionN)ÚTensor)ÚLiteral)Ú-_binary_precision_recall_curve_arg_validationÚ&_binary_precision_recall_curve_computeÚ%_binary_precision_recall_curve_formatÚ0_binary_precision_recall_curve_tensor_validationÚ%_binary_precision_recall_curve_updateÚ1_multiclass_precision_recall_curve_arg_validationÚ*_multiclass_precision_recall_curve_computeÚ)_multiclass_precision_recall_curve_formatÚ4_multiclass_precision_recall_curve_tensor_validationÚ)_multiclass_precision_recall_curve_updateÚ1_multilabel_precision_recall_curve_arg_validationÚ*_multilabel_precision_recall_curve_computeÚ)_multilabel_precision_recall_curve_formatÚ4_multilabel_precision_recall_curve_tensor_validationÚ)_multilabel_precision_recall_curve_update)Ú_safe_divide)Ú	_bincount)ÚClassificationTask)Úrank_zero_warnÚmacroÚ	precisionÚrecallÚaverage)r   ÚweightedÚnoneÚweightsÚreturnc                 óØ  — t          | t          ¦  «        rÊt          |t          ¦  «        rµt          j        t          j        | ¦  «        t          j        | ¦  «        | ¦  «        } t          j        t          j        |¦  «        t          j        |¦  «        |¦  «        }t          j        |dd…dd…f         |dd…dd…f         z
  | dd…dd…f         z  d¦  «         }n,t          j        d„ t          | |¦  «        D ¦   «         ¦  «        }|�|dk    r|S t          j        |¦  «         	                    ¦   «         rt          d|› d�t          ¦  «         t          j        |¦  «         }|dk    r||                              ¦   «         S |d	k    rM|�Kt          ||         ||                              ¦   «         ¦  «        }||         |z                       ¦   «         S t          d
¦  «        ‚)z8Reduce multiple average precision score into one number.Né   éÿÿÿÿc                 óz   — g | ]8\  }}t          j        |d d…         |dd…         z
  |dd…         z  ¦  «         ‘Œ9S )r$   Nr%   )ÚtorchÚsum)Ú.0ÚpÚrs      úˆ/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/torchmetrics/functional/classification/average_precision.pyú
<listcomp>z-_reduce_average_precision.<locals>.<listcomp>7   sJ   € ÐdÐdÐdÁTÀQÈ�EœI q¨¨¨¤u¨q°°"°¬v¡~¸¸3¸B¸3¼Ñ&?Ñ@Ô@Ð@ÐdÐdÐdó    r    zUAverage precision score for one or more classes was `nan`. Ignoring these classes in z-averager   r   zBReceived an incompatible combinations of inputs to make reduction.)Ú
isinstancer   r'   ÚwhereÚisnanÚ
zeros_liker(   ÚstackÚzipÚanyr   ÚUserWarningÚmeanr   Ú
ValueError)r   r   r   r!   ÚresÚidxs         r,   Ú_reduce_average_precisionr;   +   sÙ  € õ �)�VÑ$Ô$ð f­°F½FÑ)CÔ)Cð fÝ”K¥¤¨IÑ 6Ô 6½Ô8HÈÑ8SÔ8SÐU^Ñ_Ô_ˆ	Ý”�Uœ[¨Ñ0Ô0µ%Ô2BÀ6Ñ2JÔ2JÈFÑSÔSˆÝŒy˜&    A B B œ-¨&°°°°C°R°C°¬.Ñ8¸IÀaÀaÀaÈÈ"ÈÀfÔ<MÑMÈqÑQÔQÐQˆˆåŒkÐdÐdÍSÐQZÐ\bÑMcÔMcÐdÑdÔdÑeÔeˆØ€˜' VÒ+Ð+Øˆ
Ý„{�3ÑÔ×ÒÑÔð 
ÝØuÐdkÐuÐuÐuÝñ	
ô 	
ð 	
õ Œ;�sÑÔÐ
€CØ�'ÒÐØ�3Œx�}Š}‰ŒÐØ�*ÒÐ Ð!4Ý˜w sœ|¨W°S¬\×-=Ò-=Ñ-?Ô-?Ñ@Ô@ˆØ�C”˜7Ñ"×'Ò'Ñ)Ô)Ð)Ý
ÐYÑ
ZÔ
ZÐZr.   ÚstateÚ
thresholdsc                 óx  — t          | |¦  «        \  }}}t          j        t          j        |¦  «        t          j        |¦  «        |¦  «        }t          j        t          j        |¦  «        t          j        |¦  «        |¦  «        }t          j        |dd …         |d d…         z
  |d d…         z  ¦  «         S )Nr$   r%   )r	   r'   r0   r1   r2   r(   )r<   r=   r   r   Ú_s        r,   Ú!_binary_average_precision_computer@   H   s¡   € õ BÀ%ÈÑTÔTÑ€Iˆv�qÝ”�EœK¨	Ñ2Ô2µEÔ4DÀYÑ4OÔ4OÐQZÑ[Ô[€IÝŒ[�œ VÑ,Ô,­eÔ.>¸vÑ.FÔ.FÈÑOÔO€FÝŒI�v˜a˜b˜b”z F¨3¨B¨3¤KÑ/°9¸S¸b¸S´>ÑAÑBÔBÐBÐBr.   TÚpredsÚtargetÚignore_indexÚvalidate_argsc                 ó¶   — |r!t          ||¦  «         t          | ||¦  «         t          | |||¦  «        \  } }}t          | ||¦  «        }t	          ||¦  «        S )a  Compute the average precision (AP) score for binary tasks.

    The AP score summarizes a precision-recall curve as an weighted mean of precisions at each threshold, with the
    difference in recall from the previous threshold as weight:

    .. math::
        AP = \sum{n} (R_n - R_{n-1}) P_n

    where :math:`P_n, R_n` is the respective precision and recall at threshold index :math:`n`. This value is
    equivalent to the area under the precision-recall curve (AUPRC).

    Accepts the following input tensors:

    - ``preds`` (float tensor): ``(N, ...)``. Preds should be a tensor containing probabilities or logits for each
      observation. If preds has values outside [0,1] range we consider the input to be logits and will auto apply
      sigmoid per element.
    - ``target`` (int tensor): ``(N, ...)``. Target should be a tensor containing ground truth labels, and therefore
      only contain {0,1} values (except if `ignore_index` is specified). The value 1 always encodes the positive class.

    Additional dimension ``...`` will be flattened into the batch dimension.

    The implementation both supports calculating the metric in a non-binned but accurate version and a binned version
    that is less accurate but more memory efficient. Setting the `thresholds` argument to `None` will activate the
    non-binned  version that uses memory of size :math:`\mathcal{O}(n_{samples})` whereas setting the `thresholds`
    argument to either an integer, list or a 1d tensor will use a binned version that uses memory of
    size :math:`\mathcal{O}(n_{thresholds})` (constant memory).

    Args:
        preds: Tensor with predictions
        target: Tensor with true labels
        thresholds:
            Can be one of:

            - If set to `None`, will use a non-binned approach where thresholds are dynamically calculated from
              all the data. Most accurate but also most memory consuming approach.
            - If set to an `int` (larger than 1), will use that number of thresholds linearly spaced from
              0 to 1 as bins for the calculation.
            - If set to an `list` of floats, will use the indicated thresholds in the list as bins for the calculation
            - If set to an 1d `tensor` of floats, will use the indicated thresholds in the tensor as
              bins for the calculation.

        ignore_index:
            Specifies a target value that is ignored and does not contribute to the metric calculation
        validate_args: bool indicating if input arguments and tensors should be validated for correctness.
            Set to ``False`` for faster computations.

    Returns:
        A single scalar with the average precision score

    Example:
        >>> from torchmetrics.functional.classification import binary_average_precision
        >>> preds = torch.tensor([0, 0.5, 0.7, 0.8])
        >>> target = torch.tensor([0, 1, 1, 0])
        >>> binary_average_precision(preds, target, thresholds=None)
        tensor(0.5833)
        >>> binary_average_precision(preds, target, thresholds=5)
        tensor(0.6667)

    )r   r   r
   r   r@   )rA   rB   r=   rC   rD   r<   s         r,   Úbinary_average_precisionrF   R   sm   € ðD ð VÝ5°jÀ,ÑOÔOÐOÝ8¸ÀÈÑUÔUÐUÝ EÀeÈVÐU_ÐamÑ nÔ nÑ€Eˆ6�:Ý1°%¸ÀÑLÔL€EÝ,¨U°JÑ?Ô?Ð?r.   Únum_classesc                 ó^   — t          | ||¦  «         d}||vrt          d|› d|› �¦  «        ‚d S )N)r   r   r    Nú)Expected argument `average` to be one of ú	 but got )r   r8   )rG   r   r=   rC   Úallowed_averages        r,   Ú,_multiclass_average_precision_arg_validationrL   œ   sN   € õ 6°kÀ:È|Ñ\Ô\Ð\Ø9€OØ�oÐ%Ð%ÝÐhÀ_ÐhÐhÐ_fÐhÐhÑiÔiÐið &Ð%r.   c           
      óô   — t          | ||¦  «        \  }}}t          ||||€)t          | d         |¬¦  «                             ¦   «         n'| d         d d …dd d …f                              d¦  «        ¬¦  «        S )Nr$   )Ú	minlengthr   r%   ©r!   )r   r;   r   Úfloatr(   )r<   rG   r   r=   r   r   r?   s          r,   Ú%_multiclass_average_precision_computerQ   ¨   s™   € õ FÀeÈ[ÐZdÑeÔeÑ€Iˆv�qÝ$ØØØØFPÐFX•	˜% œ(¨kÐ:Ñ:Ô:×@Ò@ÑBÔBÐBÐ^cÐdeÔ^fÐghÐghÐghÐjkÐmnÐmnÐmnÐgnÔ^o×^sÒ^sÐtvÑ^wÔ^wð	ñ ô ð r.   c                 óÄ   — |r$t          ||||¦  «         t          | |||¦  «         t          | ||||¦  «        \  } }}t          | |||¦  «        }t	          ||||¦  «        S )aÃ  Compute the average precision (AP) score for multiclass tasks.

    The AP score summarizes a precision-recall curve as an weighted mean of precisions at each threshold, with the
    difference in recall from the previous threshold as weight:

    .. math::
        AP = \sum{n} (R_n - R_{n-1}) P_n

    where :math:`P_n, R_n` is the respective precision and recall at threshold index :math:`n`. This value is
    equivalent to the area under the precision-recall curve (AUPRC).

    Accepts the following input tensors:

    - ``preds`` (float tensor): ``(N, C, ...)``. Preds should be a tensor containing probabilities or logits for each
      observation. If preds has values outside [0,1] range we consider the input to be logits and will auto apply
      softmax per sample.
    - ``target`` (int tensor): ``(N, ...)``. Target should be a tensor containing ground truth labels, and therefore
      only contain values in the [0, n_classes-1] range (except if `ignore_index` is specified).

    Additional dimension ``...`` will be flattened into the batch dimension.

    The implementation both supports calculating the metric in a non-binned but accurate version and a binned version
    that is less accurate but more memory efficient. Setting the `thresholds` argument to `None` will activate the
    non-binned  version that uses memory of size :math:`\mathcal{O}(n_{samples})` whereas setting the `thresholds`
    argument to either an integer, list or a 1d tensor will use a binned version that uses memory of
    size :math:`\mathcal{O}(n_{thresholds} \times n_{classes})` (constant memory).

    Args:
        preds: Tensor with predictions
        target: Tensor with true labels
        num_classes: Integer specifying the number of classes
        average:
            Defines the reduction that is applied over classes. Should be one of the following:

            - ``macro``: Calculate score for each class and average them
            - ``weighted``: calculates score for each class and computes weighted average using their support
            - ``"none"`` or ``None``: calculates score for each class and applies no reduction
        thresholds:
            Can be one of:

            - If set to `None`, will use a non-binned approach where thresholds are dynamically calculated from
              all the data. Most accurate but also most memory consuming approach.
            - If set to an `int` (larger than 1), will use that number of thresholds linearly spaced from
              0 to 1 as bins for the calculation.
            - If set to an `list` of floats, will use the indicated thresholds in the list as bins for the calculation
            - If set to an 1d `tensor` of floats, will use the indicated thresholds in the tensor as
              bins for the calculation.

        ignore_index:
            Specifies a target value that is ignored and does not contribute to the metric calculation
        validate_args: bool indicating if input arguments and tensors should be validated for correctness.
            Set to ``False`` for faster computations.

    Returns:
        If `average=None|"none"` then a 1d tensor of shape (n_classes, ) will be returned with AP score per class.
        If `average="macro"|"weighted"` then a single scalar is returned.

    Example:
        >>> from torchmetrics.functional.classification import multiclass_average_precision
        >>> preds = torch.tensor([[0.75, 0.05, 0.05, 0.05, 0.05],
        ...                       [0.05, 0.75, 0.05, 0.05, 0.05],
        ...                       [0.05, 0.05, 0.75, 0.05, 0.05],
        ...                       [0.05, 0.05, 0.05, 0.75, 0.05]])
        >>> target = torch.tensor([0, 1, 3, 2])
        >>> multiclass_average_precision(preds, target, num_classes=5, average="macro", thresholds=None)
        tensor(0.6250)
        >>> multiclass_average_precision(preds, target, num_classes=5, average=None, thresholds=None)
        tensor([1.0000, 1.0000, 0.2500, 0.2500,    nan])
        >>> multiclass_average_precision(preds, target, num_classes=5, average="macro", thresholds=5)
        tensor(0.5000)
        >>> multiclass_average_precision(preds, target, num_classes=5, average=None, thresholds=5)
        tensor([1.0000, 1.0000, 0.2500, 0.2500, -0.0000])

    )rL   r   r   r   rQ   )rA   rB   rG   r   r=   rC   rD   r<   s           r,   Úmulticlass_average_precisionrS   ·   sƒ   € ðf ð gÝ4°[À'È:ÐWcÑdÔdÐdÝ<¸UÀFÈKÐYeÑfÔfÐfÝ IØˆv�{ J°ñ!ô !Ñ€Eˆ6�:õ 6°e¸VÀ[ÐR\Ñ]Ô]€EÝ0°¸ÀWÈjÑYÔYÐYr.   Ú
num_labels)Úmicror   r   r    c                 ó^   — t          | ||¦  «         d}||vrt          d|› d|› �¦  «        ‚d S )N)rU   r   r   r    NrI   rJ   )r   r8   )rT   r   r=   rC   rK   s        r,   Ú,_multilabel_average_precision_arg_validationrW     sN   € õ 6°jÀ*ÈlÑ[Ô[Ð[ØB€OØ�oÐ%Ð%ÝÐhÀ_ÐhÐhÐ_fÐhÐhÑiÔiÐið &Ð%r.   c           
      ó2  — |dk    r�t          | t          ¦  «        r|�|                      d¦  «        } nR| d                              ¦   «         | d                              ¦   «         }}|�||k    }||          }||          }||f} t	          | |¦  «        S t          | |||¦  «        \  }}	}
t          ||	||€2| d         dk                         d¬¦  «                             ¦   «         n'| d         d d …dd d …f                              d¦  «        ¬¦  «        S )NrU   r$   r   )Údimr%   rO   )r/   r   r(   Úflattenr@   r   r;   rP   )r<   rT   r   r=   rC   rA   rB   r:   r   r   r?   s              r,   Ú%_multilabel_average_precision_computer[      s<  € ð �'ÒÐÝ�e�VÑ$Ô$ð 	$¨Ð)?Ø—I’I˜a‘L”LˆEˆEà! !œH×,Ò,Ñ.Ô.°°a´×0@Ò0@Ñ0BÔ0B�6ˆEØÐ'Ø Ò,�Ø˜s˜dœ�Ø  œ�Ø˜F�OˆEÝ0°¸
ÑCÔCÐCåEÀeÈZÐYcÐeqÑrÔrÑ€Iˆv�qÝ$ØØØØ6@Ð6H��q”˜Q’×#Ò#¨Ð#Ñ*Ô*×0Ò0Ñ2Ô2Ð2ÈeÐTUÌhÐWXÐWXÐWXÐZ[Ð]^Ð]^Ð]^ÐW^ÔN_×NcÒNcÐdfÑNgÔNgð	ñ ô ð r.   c                 óÆ   — |r$t          ||||¦  «         t          | |||¦  «         t          | ||||¦  «        \  } }}t          | |||¦  «        }t	          |||||¦  «        S )a  Compute the average precision (AP) score for multilabel tasks.

    The AP score summarizes a precision-recall curve as an weighted mean of precisions at each threshold, with the
    difference in recall from the previous threshold as weight:

    .. math::
        AP = \sum{n} (R_n - R_{n-1}) P_n

    where :math:`P_n, R_n` is the respective precision and recall at threshold index :math:`n`. This value is
    equivalent to the area under the precision-recall curve (AUPRC).

    Accepts the following input tensors:

    - ``preds`` (float tensor): ``(N, C, ...)``. Preds should be a tensor containing probabilities or logits for each
      observation. If preds has values outside [0,1] range we consider the input to be logits and will auto apply
      sigmoid per element.
    - ``target`` (int tensor): ``(N, C, ...)``. Target should be a tensor containing ground truth labels, and therefore
      only contain {0,1} values (except if `ignore_index` is specified).

    Additional dimension ``...`` will be flattened into the batch dimension.

    The implementation both supports calculating the metric in a non-binned but accurate version and a binned version
    that is less accurate but more memory efficient. Setting the `thresholds` argument to `None` will activate the
    non-binned  version that uses memory of size :math:`\mathcal{O}(n_{samples})` whereas setting the `thresholds`
    argument to either an integer, list or a 1d tensor will use a binned version that uses memory of
    size :math:`\mathcal{O}(n_{thresholds} \times n_{labels})` (constant memory).

    Args:
        preds: Tensor with predictions
        target: Tensor with true labels
        num_labels: Integer specifying the number of labels
        average:
            Defines the reduction that is applied over labels. Should be one of the following:

            - ``micro``: Sum score over all labels
            - ``macro``: Calculate score for each label and average them
            - ``weighted``: calculates score for each label and computes weighted average using their support
            - ``"none"`` or ``None``: calculates score for each label and applies no reduction
        thresholds:
            Can be one of:

            - If set to `None`, will use a non-binned approach where thresholds are dynamically calculated from
              all the data. Most accurate but also most memory consuming approach.
            - If set to an `int` (larger than 1), will use that number of thresholds linearly spaced from
              0 to 1 as bins for the calculation.
            - If set to an `list` of floats, will use the indicated thresholds in the list as bins for the calculation
            - If set to an 1d `tensor` of floats, will use the indicated thresholds in the tensor as
              bins for the calculation.

        ignore_index:
            Specifies a target value that is ignored and does not contribute to the metric calculation
        validate_args: bool indicating if input arguments and tensors should be validated for correctness.
            Set to ``False`` for faster computations.

    Returns:
        If `average=None|"none"` then a 1d tensor of shape (n_classes, ) will be returned with AP score per class.
        If `average="micro|macro"|"weighted"` then a single scalar is returned.

    Example:
        >>> from torchmetrics.functional.classification import multilabel_average_precision
        >>> preds = torch.tensor([[0.75, 0.05, 0.35],
        ...                       [0.45, 0.75, 0.05],
        ...                       [0.05, 0.55, 0.75],
        ...                       [0.05, 0.65, 0.05]])
        >>> target = torch.tensor([[1, 0, 1],
        ...                        [0, 0, 0],
        ...                        [0, 1, 1],
        ...                        [1, 1, 1]])
        >>> multilabel_average_precision(preds, target, num_labels=3, average="macro", thresholds=None)
        tensor(0.7500)
        >>> multilabel_average_precision(preds, target, num_labels=3, average=None, thresholds=None)
        tensor([0.7500, 0.5833, 0.9167])
        >>> multilabel_average_precision(preds, target, num_labels=3, average="macro", thresholds=5)
        tensor(0.7778)
        >>> multilabel_average_precision(preds, target, num_labels=3, average=None, thresholds=5)
        tensor([0.7500, 0.6667, 0.9167])

    )rW   r   r   r   r[   )rA   rB   rT   r   r=   rC   rD   r<   s           r,   Úmultilabel_average_precisionr]   <  s†   € ðn ð fÝ4°ZÀÈ*ÐVbÑcÔcÐcÝ<¸UÀFÈJÐXdÑeÔeÐeÝ IØˆv�z :¨|ñ!ô !Ñ€Eˆ6�:õ 6°e¸VÀZÐQ[Ñ\Ô\€EÝ0°¸
ÀGÈZÐYeÑfÔfÐfr.   Útask)ÚbinaryÚ
multiclassÚ
multilabelc	           	      óÜ  — t          j        |¦  «        }|t           j        k    rt          | ||||¦  «        S |t           j        k    rJt          |t          ¦  «        s t          dt          |¦  «        › d�¦  «        ‚t          | ||||||¦  «        S |t           j
        k    rJt          |t          ¦  «        s t          dt          |¦  «        › d�¦  «        ‚t          | ||||||¦  «        S dS )aÑ  Compute the average precision (AP) score.

    The AP score summarizes a precision-recall curve as an weighted mean of precisions at each threshold, with the
    difference in recall from the previous threshold as weight:

    .. math::
        AP = \sum{n} (R_n - R_{n-1}) P_n

    where :math:`P_n, R_n` is the respective precision and recall at threshold index :math:`n`. This value is
    equivalent to the area under the precision-recall curve (AUPRC).

    This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
    ``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
    :func:`~torchmetrics.functional.classification.binary_average_precision`,
    :func:`~torchmetrics.functional.classification.multiclass_average_precision` and
    :func:`~torchmetrics.functional.classification.multilabel_average_precision`
    for the specific details of each argument influence and examples.

    Legacy Example:
        >>> from torchmetrics.functional.classification import average_precision
        >>> pred = torch.tensor([0.0, 1.0, 2.0, 3.0])
        >>> target = torch.tensor([0, 1, 1, 1])
        >>> average_precision(pred, target, task="binary")
        tensor(1.)

        >>> pred = torch.tensor([[0.75, 0.05, 0.05, 0.05, 0.05],
        ...                      [0.05, 0.75, 0.05, 0.05, 0.05],
        ...                      [0.05, 0.05, 0.75, 0.05, 0.05],
        ...                      [0.05, 0.05, 0.05, 0.75, 0.05]])
        >>> target = torch.tensor([0, 1, 3, 2])
        >>> average_precision(pred, target, task="multiclass", num_classes=5, average=None)
        tensor([1.0000, 1.0000, 0.2500, 0.2500,    nan])

    z+`num_classes` is expected to be `int` but `z was passed.`z*`num_labels` is expected to be `int` but `N)r   Úfrom_strÚBINARYrF   Ú
MULTICLASSr/   Úintr8   ÚtyperS   Ú
MULTILABELr]   )	rA   rB   r^   r=   rG   rT   r   rC   rD   s	            r,   Úaverage_precisionri   �  s	  € õZ Ô& tÑ,Ô,€DØÕ!Ô(Ò(Ð(Ý'¨¨v°zÀ<ÐQ^Ñ_Ô_Ð_ØÕ!Ô,Ò,Ð,Ý˜+¥sÑ+Ô+ð 	mÝÐkÍ4ÐP[ÑK\ÔK\ÐkÐkÐkÑlÔlÐlÝ+Ø�6˜;¨°¸\È=ñ
ô 
ð 	
ð Õ!Ô,Ò,Ð,Ý˜*¥cÑ*Ô*ð 	kÝÐiÍ$ÈzÑJZÔJZÐiÐiÐiÑjÔjÐjÝ+¨E°6¸:ÀwÐPZÐ\hÐjwÑxÔxÐxØˆ4r.   )r   N)NNT)r   NN)r   NNT)NN)N)NNNr   NT)/Útypingr   r   r   r'   r   Útyping_extensionsr   Ú=torchmetrics.functional.classification.precision_recall_curver   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   Útorchmetrics.utilities.computer   Útorchmetrics.utilities.datar   Útorchmetrics.utilities.enumsr   Útorchmetrics.utilities.printsr   r;   Útupler@   rf   ÚlistrP   ÚboolrF   rL   rQ   rS   rW   r[   r]   ri   © r.   r,   ú<module>ru      sÌ  ðð )Ð (Ð (Ð (Ð (Ð (Ð (Ð (Ð (Ð (à €€€Ø Ð Ð Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð" 8Ð 7Ð 7Ð 7Ð 7Ð 7Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø 8Ð 8Ð 8Ð 8Ð 8Ð 8ð ?FØ $ð	[ð [Ø�V˜T &œ\Ð)Ô*ð[à�&˜$˜vœ,Ð&Ô'ð[ð �gÐ9Ô:Ô;ð[ð �fÔð	[ð
 ð[ð [ð [ð [ð:CØ�˜˜v v˜~Ô.Ð.Ô/ðCà˜Ô ðCð ðCð Cð Cð Cð =AØ"&ØðG@ð G@ØðG@àðG@ð ˜˜s D¨¤K°Ð7Ô8Ô9ðG@ð ˜3”-ð	G@ð
 ðG@ð ðG@ð G@ð G@ð G@ðX ?FØ<@Ø"&ð		jð 	jØð	jà�gÐ9Ô:Ô;ð	jð ˜˜s D¨¤K°Ð7Ô8Ô9ð	jð ˜3”-ð		jð
 
ð	jð 	jð 	jð 	jð ?FØ#'ð	ð Ø�˜˜v v˜~Ô.Ð.Ô/ðàðð �gÐ9Ô:Ô;ðð ˜Ô ð	ð
 ðð ð ð ð& ?FØ<@Ø"&ØðZZð ZZØðZZàðZZð ðZZð �gÐ9Ô:Ô;ð	ZZð
 ˜˜s D¨¤K°Ð7Ô8Ô9ðZZð ˜3”-ðZZð ðZZð ðZZð ZZð ZZð ZZð@ =AØ"&ð		jð 	jØð	jà�gÐBÔCÔDð	jð ˜˜s D¨¤K°Ð7Ô8Ô9ð	jð ˜3”-ð		jð
 
ð	jð 	jð 	jð 	jð" #'ðð Ø�˜˜v v˜~Ô.Ð.Ô/ðàðð �gÐBÔCÔDðð ˜Ô ð	ð
 ˜3”-ðð ðð ð ð ð@ HOØ<@Ø"&Øð^gð ^gØð^gàð^gð ð^gð �gÐBÔCÔDð	^gð
 ˜˜s D¨¤K°Ð7Ô8Ô9ð^gð ˜3”-ð^gð ð^gð ð^gð ^gð ^gð ^gðJ =AØ!%Ø $Ø>EØ"&Øð:ð :Øð:àð:ð Ð6Ô
7ð:ð ˜˜s D¨¤K°Ð7Ô8Ô9ð	:ð
 ˜#”ð:ð ˜”ð:ð �gÐ9Ô:Ô;ð:ð ˜3”-ð:ð ð:ð ˆfÔð:ð :ð :ð :ð :ð :r.   