提交 9f54fa24 编写于 作者: W wanghaoshuang

Rename info to query_id and add more comments.

上级 9891667b
...@@ -297,7 +297,7 @@ def auc_evaluator( ...@@ -297,7 +297,7 @@ def auc_evaluator(
def pnpair_evaluator( def pnpair_evaluator(
input, input,
label, label,
info, query_id,
weight=None, weight=None,
name=None, ): name=None, ):
""" """
...@@ -308,16 +308,20 @@ def pnpair_evaluator( ...@@ -308,16 +308,20 @@ def pnpair_evaluator(
.. code-block:: python .. code-block:: python
eval = pnpair_evaluator(input, label, info) eval = pnpair_evaluator(input, label, query_id)
:param input: Input Layer name. The output prediction of network. :param input: Input Layer name. The output prediction of network.
:type input: LayerOutput :type input: LayerOutput
:param label: Label layer name. :param label: Label layer name.
:type label: LayerOutput :type label: LayerOutput
:param info: Info layer name. (TODO, explaination) :param query_id: Query_id layer name. Query_id indicates that which query
:type info: LayerOutput each sample belongs to. Its shape should be
the same as output of Label layer.
:type query_id: LayerOutput
:param weight: Weight Layer name. It should be a matrix with size :param weight: Weight Layer name. It should be a matrix with size
[sample_num, 1]. (TODO, explaination) [sample_num, 1] which indicates the weight of each sample.
The default weight of sample is 1 if the weight layer is None.
And the pair weight is the mean of the two samples' weight.
:type weight: LayerOutput :type weight: LayerOutput
:param name: Evaluator name. :param name: Evaluator name.
:type name: None|basestring :type name: None|basestring
...@@ -326,8 +330,8 @@ def pnpair_evaluator( ...@@ -326,8 +330,8 @@ def pnpair_evaluator(
input = [input] input = [input]
if label: if label:
input.append(label) input.append(label)
if info: if query_id:
input.append(info) input.append(query_id)
evaluator_base( evaluator_base(
input=input, input=input,
type="pnpair", type="pnpair",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册