diff --git a/mindspore/nn/metrics/confusion_matrix.py b/mindspore/nn/metrics/confusion_matrix.py index b4cde74b7ae..6c88709b78b 100644 --- a/mindspore/nn/metrics/confusion_matrix.py +++ b/mindspore/nn/metrics/confusion_matrix.py @@ -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: diff --git a/mindspore/nn/metrics/mean_surface_distance.py b/mindspore/nn/metrics/mean_surface_distance.py index 35e2703ee9c..622b8468ac6 100644 --- a/mindspore/nn/metrics/mean_surface_distance.py +++ b/mindspore/nn/metrics/mean_surface_distance.py @@ -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: diff --git a/mindspore/nn/metrics/recall.py b/mindspore/nn/metrics/recall.py index 20ae5d9d7ba..7badf0f0326 100644 --- a/mindspore/nn/metrics/recall.py +++ b/mindspore/nn/metrics/recall.py @@ -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 diff --git a/mindspore/nn/metrics/root_mean_square_surface_distance.py b/mindspore/nn/metrics/root_mean_square_surface_distance.py index 7123bf7efda..ac7fd7bcd2a 100644 --- a/mindspore/nn/metrics/root_mean_square_surface_distance.py +++ b/mindspore/nn/metrics/root_mean_square_surface_distance.py @@ -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: diff --git a/mindspore/nn/metrics/topk.py b/mindspore/nn/metrics/topk.py index a768b02d464..d03bde82c72 100644 --- a/mindspore/nn/metrics/topk.py +++ b/mindspore/nn/metrics/topk.py @@ -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)`