forked from mindspore-Ecosystem/mindspore
!26738 fix comments in metric
Merge pull request !26738 from liutongtong9/code_docs_fixmetric
This commit is contained in:
commit
b14a9ee74b
|
@ -162,15 +162,15 @@ class ConfusionMatrixMetric(Metric):
|
|||
skip_channel (bool): Whether to skip the measurement calculation on the first channel of the predicted output.
|
||||
Default: True.
|
||||
metric_name (str): Names of supported metrics , users can also set the industry common aliases for them. Choose
|
||||
from: ["sensitivity", "specificity", "precision", "negative predictive value", "miss rate",
|
||||
from: ["sensitivity", "specificity", "precision", "negative predictive value", "miss rate",
|
||||
"fall out", "false discovery rate", "false omission rate", "prevalence threshold",
|
||||
"threat score", "accuracy", "balanced accuracy", "f1 score",
|
||||
"matthews correlation coefficient", "fowlkes mallows index", "informedness", "markedness"].
|
||||
calculation_method (bool): If true, the measurement for each sample will be calculated first.
|
||||
If not, the confusion matrix of all samples will be accumulated first.
|
||||
As for classification task, 'calculation_method' should be False. Default: False.
|
||||
If not, the confusion matrix of all samples will be accumulated first.
|
||||
As for classification task, 'calculation_method' should be False. Default: False.
|
||||
decrease (str): The reduction method on data batch. `decrease` takes effect only when calculation_method
|
||||
is True. Default: "mean". Choose from:
|
||||
is True. Default: "mean". Choose from:
|
||||
["none", "mean", "sum", "mean_batch", "sum_batch", "mean_channel", "sum_channel"].
|
||||
|
||||
Supported Platforms:
|
||||
|
|
|
@ -25,7 +25,7 @@ class MeanSurfaceDistance(Metric):
|
|||
on average, the surface varies between the segmentation and the GT (ground truth).
|
||||
|
||||
Given two sets A and B, S(A) denotes the set of surface voxels of A. The shortest distance of an arbitrary voxel v
|
||||
to S(A) is defined as:
|
||||
to S(A) is defined as:
|
||||
|
||||
.. math::
|
||||
{\text{dis}}\left (v, S(A)\right ) = \underset{s_{A} \in S(A)}{\text{min }}\rVert v - s_{A} \rVert \
|
||||
|
@ -36,7 +36,7 @@ class MeanSurfaceDistance(Metric):
|
|||
AvgSurDis(B\rightarrow A) = \frac{\sum_{s_{B} \in S(B)}^{} {\text{dis} \
|
||||
left ( s_{B}, S(A) \right )} } {\left | S(B) \right |}
|
||||
|
||||
Where the ||*|| denotes a distance measure. |*| denotes the number of elements.
|
||||
Where the \|\|\*\|\| denotes a distance measure. \|\*\| denotes the number of elements.
|
||||
|
||||
The mean of surface distance form set(B) to set(A) and from set(A) to set(B) is:
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class Recall(EvaluationBase):
|
|||
|
||||
Args:
|
||||
eval_type (str): 'classification' or 'multilabel' are supported. Default: 'classification'.
|
||||
Default: 'classification'.
|
||||
Default: 'classification'.
|
||||
|
||||
Examples:
|
||||
>>> import numpy as np
|
||||
|
|
|
@ -35,7 +35,7 @@ class RootMeanSquareDistance(Metric):
|
|||
RmsSurDis(B \rightarrow A) = \sqrt{\frac{\sum_{s_{B} \in S(B)}^{} {\text{dis}^2 \left ( s_{B}, S(A)
|
||||
\right )} }{\left | S(B) \right |}}
|
||||
|
||||
Where the ||\*|| denotes a distance measure. |\*| denotes the number of elements.
|
||||
Where the \|\|\*\|\| denotes a distance measure.\ |\*\| denotes the number of elements.
|
||||
|
||||
The Root Mean Square Surface Distance form set(B) to set(A) and from set(A) to set(B) is:
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class TopKCategoricalAccuracy(Metric):
|
|||
Updates the internal evaluation result `y_pred` and `y`.
|
||||
|
||||
Args:
|
||||
inputs: Input `y_pred` and `y`. ` y_pred` and `y` are Tensor, list or numpy.ndarray.
|
||||
inputs: Input `y_pred` and `y`. `y_pred` and `y` are Tensor, list or numpy.ndarray.
|
||||
`y_pred` is in most cases (not strictly) a list of floating numbers in range :math:`[0, 1]`
|
||||
and the shape is :math:`(N, C)`, where :math:`N` is the number of cases and :math:`C`
|
||||
is the number of categories. `y` contains values of integers. The shape is :math:`(N, C)`
|
||||
|
|
Loading…
Reference in New Issue