提交 68811bcb 编写于 作者: Y Yibing Liu

Format the doc of layers.auc

上级 23ec12cf
...@@ -59,14 +59,14 @@ def auc(input, label, curve='ROC', num_thresholds=200): ...@@ -59,14 +59,14 @@ def auc(input, label, curve='ROC', num_thresholds=200):
This implementation computes the AUC according to forward output and label. This implementation computes the AUC according to forward output and label.
It is used very widely in binary classification evaluation. It is used very widely in binary classification evaluation.
As a note: If input label contains values other than 0 and 1, it will be Note: If input label contains values other than 0 and 1, it will be cast
cast to bool. You can find the relevant definitions `here to `bool`. Find the relevant definitions `here <https://en.wikipedia.org\
<https://en.wikipedia.org/wiki/Receiver_operating_characteristic /wiki/Receiver_operating_characteristic#Area_under_the_curve>`_.
#Area_under_the_curve>`_.
There are two types of possible curves: There are two types of possible curves:
1. ROC: Receiver operating characteristic
2. PR: Precision Recall 1. ROC: Receiver operating characteristic;
2. PR: Precision Recall
Args: Args:
input(Variable): A floating-point 2D Variable, values are in the range input(Variable): A floating-point 2D Variable, values are in the range
...@@ -85,9 +85,9 @@ def auc(input, label, curve='ROC', num_thresholds=200): ...@@ -85,9 +85,9 @@ def auc(input, label, curve='ROC', num_thresholds=200):
Examples: Examples:
.. code-block:: python .. code-block:: python
# network is a binary classification model and label the ground truth # network is a binary classification model and label the ground truth
prediction = network(image, is_infer=True) prediction = network(image, is_infer=True)
auc_out=fluid.layers.auc(input=prediction, label=label) auc_out=fluid.layers.auc(input=prediction, label=label)
""" """
warnings.warn( warnings.warn(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册