def pr_curve_summary(tag, labels, predictions, num_thresholds, weights=None):
<EOL>if num_thresholds > <NUM_LIT>:<EOL><INDENT>logging.warning('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>num_thresholds = <NUM_LIT><EOL><DEDENT>labels = _make_numpy_array(labels)<EOL>predictions = _make_numpy_array(predictions)<EOL>if weights is not None:<EOL><INDENT>weights = _make_numpy_array(weights)<EOL><DEDENT>data = _compute_curve(labels, predictions, num_thresholds=num_thresholds, weights=weights)<EOL>pr_curve_plugin_data = PrCurvePluginData(version=<NUM_LIT:0>,<EOL>num_thresholds=num_thresholds).SerializeToString()<EOL>plugin_data = [SummaryMetadata.PluginData(plugin_name='<STR_LIT>',<EOL>content=pr_curve_plugin_data)]<EOL>smd = SummaryMetadata(plugin_data=plugin_data)<EOL>tensor = TensorProto(dtype='<STR_LIT>',<EOL>float_val=data.reshape(-<NUM_LIT:1>).tolist(),<EOL>tensor_shape=TensorShapeProto(<EOL>dim=[TensorShapeProto.Dim(size=data.shape[<NUM_LIT:0>]),<EOL>TensorShapeProto.Dim(size=data.shape[<NUM_LIT:1>])]))<EOL>return Summary(value=[Summary.Value(tag=tag, metadata=smd, tensor=tensor)])<EOL>
Outputs a precision-recall curve `Summary` protocol buffer.

    Parameters
    ----------
        tag : str
            A tag attached to the summary. Used by TensorBoard for organization.
        labels : MXNet `NDArray` or `numpy.ndarray`.
            The ground truth values. A tensor of 0/1 values with arbitrary shape.
        predictions : MXNet `NDArray` or `numpy.ndarray`.
            A float32 tensor whose values are in the range `[0, 1]`. Dimensions must
            match those of `labels`.
        num_thresholds : int
            Number of thresholds, evenly distributed in `[0, 1]`, to compute PR metrics for.
            Should be `>= 2`. This value should be a constant integer value, not a tensor
            that stores an integer.
            The thresholds for computing the pr curves are calculated in the following way:
            `width = 1.0 / (num_thresholds - 1),
            thresholds = [0.0, 1*width, 2*width, 3*width, ..., 1.0]`.
        weights : MXNet `NDArray` or `numpy.ndarray`.
            Optional float32 tensor. Individual counts are multiplied by this value.
            This tensor must be either the same shape as or broadcastable to the `labels` tensor.

    Returns
    -------
        A `Summary` protobuf of the pr_curve.