def precision_recall_curve( pred: torch.Tensor, target: torch.Tensor, sample_weight: Optional[Sequence] = None, pos_label: int = 1., ): """ Computes precision-recall pairs for different thresholds. .. warning :: Deprecated in favor of :func:`~pytorch_lightning.metrics.functional.precision_recall_curve.precision_recall_curve` """ rank_zero_warn( "This `precision_recall_curve` was deprecated in v1.1.0 in favor of" " `from pytorch_lightning.metrics.functional.precision_recall_curve import precision_recall_curve`." " It will be removed in v1.3.0", DeprecationWarning) return __prc(preds=pred, target=target, sample_weights=sample_weight, pos_label=pos_label)
def multiclass_precision_recall_curve( pred: torch.Tensor, target: torch.Tensor, sample_weight: Optional[Sequence] = None, num_classes: Optional[int] = None, ): """ Computes precision-recall pairs for different thresholds given a multiclass scores. .. warning :: Deprecated in favor of :func:`~pytorch_lightning.metrics.functional.precision_recall_curve.precision_recall_curve` """ rank_zero_warn( "This `multiclass_precision_recall_curve` was deprecated in v1.1.0 in favor of" " `from pytorch_lightning.metrics.functional.precision_recall_curve import precision_recall_curve`." " It will be removed in v1.3.0", DeprecationWarning) if num_classes is None: num_classes = get_num_classes(pred, target, num_classes) return __prc(preds=pred, target=target, sample_weights=sample_weight, num_classes=num_classes)