Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Jun 29, 2019
1 parent e908a8a commit aa81dc8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions torch_geometric/utils/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def accuracy(pred, target):
r"""Computes the accuracy of correct predictions.
r"""Computes the accuracy of predictions.
Args:
pred (Tensor): The predictions.
Expand Down Expand Up @@ -86,8 +86,8 @@ def false_negative(pred, target, num_classes):


def precision(pred, target, num_classes):
r"""Computes the precision:
:math:`\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FP}}`.
r"""Computes the precision
:math:`\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FP}}` of predictions.
Args:
pred (Tensor): The predictions.
Expand All @@ -106,8 +106,8 @@ def precision(pred, target, num_classes):


def recall(pred, target, num_classes):
r"""Computes the recall:
:math:`\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}}`.
r"""Computes the recall
:math:`\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}}` of predictions.
Args:
pred (Tensor): The predictions.
Expand All @@ -126,9 +126,9 @@ def recall(pred, target, num_classes):


def f1_score(pred, target, num_classes):
r"""Computes the :math:`F_1` score:
r"""Computes the :math:`F_1` score
:math:`2 \cdot \frac{\mathrm{precision} \cdot \mathrm{recall}}
{\mathrm{precision}+\mathrm{recall}}`.
{\mathrm{precision}+\mathrm{recall}}` of predictions.
Args:
pred (Tensor): The predictions.
Expand All @@ -147,7 +147,7 @@ def f1_score(pred, target, num_classes):


def mean_iou(pred, target, num_classes, batch=None):
r"""Computes the mean Intersection over Union score.
r"""Computes the mean Intersection over Union score of predictions.
Args:
pred (LongTensor): The predictions.
Expand Down

0 comments on commit aa81dc8

Please sign in to comment.