Collection of metrics used to evaluate the state of an eVision.EasyDeepLearning.EClassifier. More...
Public Member Functions | |
| None | __init__ (self) |
| Constructs an eVision.EasyDeepLearning.EClassificationMetrics object. | |
| None | __init__ (self, eVision.EasyDeepLearning.EClassificationMetrics other) |
| Copy constructor of an eVision.EasyDeepLearning.EClassificationMetrics object. | |
| None | Load (self, str path) |
| Loads a classification metric. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Loads a classification metric. | |
| None | Save (self, str path) |
| Saves a classification metric. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Saves a classification metric. | |
| bool | IsValid (self) |
| Indicates whether the object contains at least one classification result. | |
| None | AddResult (self, eVision.EasyDeepLearning.EClassificationResult result, str groundtruthLabel) |
| Adds the given result with the corresponding ground truth label to the metrics. | |
| None | AddMetrics (self, eVision.EasyDeepLearning.EClassificationMetrics other) |
| Adds the other metrics to the current metrics of this object. | |
| float | GetWeightedAccuracy (self, list[float] weights) |
| The label weighted accuracy. | |
| float | GetWeightedAccuracy (self, eVision.EasyDeepLearning.EDataset dataset) |
| The label weighted accuracy. | |
| float | GetLabelAccuracy (self, str label) |
| The accuracy of the classifier for a given label. | |
| float | GetWeightedError (self, list[float] weights) |
| The label weighted error. | |
| float | GetWeightedError (self, eVision.EasyDeepLearning.EDataset dataset) |
| The label weighted error. | |
| float | GetLabelError (self, str label) |
| The error of the classifier for a given label. | |
| bool | CanComputeWeightedError (self) |
| Whether the object can be used to get weighted, balanced, and label errors. | |
| int | GetConfusion (self, str trueClass, str predictedClass) |
| Confusion value of one label with another. | |
| float | Accuracy (self) |
| The accuracy of the classifier. | |
| float | BalancedAccuracy (self) |
| The balanced accuracy. | |
| float | Error (self) |
| The error of the classifier. | |
| float | BalancedError (self) |
| The balanced error. | |
Collection of metrics used to evaluate the state of an eVision.EasyDeepLearning.EClassifier.
A metric is a value summarizing a collection of classification results (eVision.EasyDeepLearning.EClassificationResult). New results can be added to the object individually with eVision.EasyDeepLearning.EClassificationMetrics.AddResult or collectively with eVision.EasyDeepLearning.EClassificationMetrics.AddMetrics.
eVision.EasyDeepLearning.EClassificationMetrics contains the following metrics:
Remarks:
License(s): BasicTypes
| None eVision.EasyDeepLearning.EClassificationMetrics.__init__ | ( | self | ) |
Constructs an eVision.EasyDeepLearning.EClassificationMetrics object.
| None eVision.EasyDeepLearning.EClassificationMetrics.__init__ | ( | self, | |
| eVision.EasyDeepLearning.EClassificationMetrics | other ) |
Copy constructor of an eVision.EasyDeepLearning.EClassificationMetrics object.
| other | Reference to the eVision.EasyDeepLearning.EClassificationMetrics object that should be copied |
| float eVision.EasyDeepLearning.EClassificationMetrics.Accuracy | ( | self | ) |
The accuracy of the classifier.
Remarks:
The accuracy is the number of images that were correctly classified (also called the true positives) over the total number of images that was used to evaluate the classifier.
| None eVision.EasyDeepLearning.EClassificationMetrics.AddMetrics | ( | self, | |
| eVision.EasyDeepLearning.EClassificationMetrics | other ) |
Adds the other metrics to the current metrics of this object.
| other | Classification metrics |
| None eVision.EasyDeepLearning.EClassificationMetrics.AddResult | ( | self, | |
| eVision.EasyDeepLearning.EClassificationResult | result, | ||
| str | groundtruthLabel ) |
Adds the given result with the corresponding ground truth label to the metrics.
| result | A reference to an eVision.EasyDeepLearning.EClassificationResult object. |
| groundtruthLabel | The ground truth label corresponding to the result |
| float eVision.EasyDeepLearning.EClassificationMetrics.BalancedAccuracy | ( | self | ) |
The balanced accuracy.
Remarks:
The balanced accuracy is the label weighted accuracy with the same weight for each labels.
| float eVision.EasyDeepLearning.EClassificationMetrics.BalancedError | ( | self | ) |
The balanced error.
Remarks:
The balanced error is the label weighted error with the same weight for each labels.
If eVision.EasyDeepLearning.EClassificationMetrics.CanComputeWeightedError is false, this method is an alias for eVision.EasyDeepLearning.EClassificationMetrics.Error.
| bool eVision.EasyDeepLearning.EClassificationMetrics.CanComputeWeightedError | ( | self | ) |
Whether the object can be used to get weighted, balanced, and label errors.
| float eVision.EasyDeepLearning.EClassificationMetrics.Error | ( | self | ) |
The error of the classifier.
Remarks:
The error, which is also called the loss, is the quantity that is minimized during the training of the deep neural network. For classification, the error is the cross-entropy.
| int eVision.EasyDeepLearning.EClassificationMetrics.GetConfusion | ( | self, | |
| str | trueClass, | ||
| str | predictedClass ) |
Confusion value of one label with another.
The confusion value of a label with another is the number of images belonging to this label that are classified as belonging to the other label.
| trueClass | The label for which to obtain the confusion value |
| predictedClass | The label with which there is a confusion |
| float eVision.EasyDeepLearning.EClassificationMetrics.GetLabelAccuracy | ( | self, | |
| str | label ) |
The accuracy of the classifier for a given label.
Remarks:
The label accuracy is the number of images of a given label that were correctly classified (also called the true positives) over the total number of images of that label that was used to evaluate the classifier.
If there is no results for the given label, the method will throw an exception.
| label | The label of which we want the accuracy |
| float eVision.EasyDeepLearning.EClassificationMetrics.GetLabelError | ( | self, | |
| str | label ) |
The error of the classifier for a given label.
Remarks:
The label error corresponds to the error only for images of the given label.
If there is no results for the given label, the method will throw an exception. If eVision.EasyDeepLearning.EClassificationMetrics.CanComputeWeightedError is false, this method is an alias for eVision.EasyDeepLearning.EClassificationMetrics.Error.
| label | The label from which to get the error. |
| float eVision.EasyDeepLearning.EClassificationMetrics.GetWeightedAccuracy | ( | self, | |
| eVision.EasyDeepLearning.EDataset | dataset ) |
The label weighted accuracy.
Remarks:
The weighted accuracy is the weighted average of the label accuracies (see eVision.EasyDeepLearning.EClassificationMetrics.GetLabelAccuracy). If there is no results for a given label, it will be ignored in the weighted accuracy.
| dataset | Dataset from which to use the label weights |
| float eVision.EasyDeepLearning.EClassificationMetrics.GetWeightedAccuracy | ( | self, | |
| list[float] | weights ) |
The label weighted accuracy.
Remarks:
The weighted accuracy is the weighted average of the label accuracies (see eVision.EasyDeepLearning.EClassificationMetrics.GetLabelAccuracy). If there is no results for a given label, it will be ignored in the weighted accuracy.
| weights | Array of label weights for the labels of the classifier (see eVision.EasyDeepLearning.EDeepLearningTool.GetLabel) |
| float eVision.EasyDeepLearning.EClassificationMetrics.GetWeightedError | ( | self, | |
| eVision.EasyDeepLearning.EDataset | dataset ) |
The label weighted error.
Remarks:
The weighted error is the weighted average of the label errors (see eVision.EasyDeepLearning.EClassificationMetrics.GetLabelError).
If there isn't any result for a given label, it will be ignored in the weighted error.
If eVision.EasyDeepLearning.EClassificationMetrics.CanComputeWeightedError is false, this method is an alias for eVision.EasyDeepLearning.EClassificationMetrics.Error.
| dataset | Dataset from which to use the label weights |
| float eVision.EasyDeepLearning.EClassificationMetrics.GetWeightedError | ( | self, | |
| list[float] | weights ) |
The label weighted error.
Remarks:
The weighted error is the weighted average of the label errors (see eVision.EasyDeepLearning.EClassificationMetrics.GetLabelError).
If there isn't any result for a given label, it will be ignored in the weighted error.
If eVision.EasyDeepLearning.EClassificationMetrics.CanComputeWeightedError is false, this method is an alias for eVision.EasyDeepLearning.EClassificationMetrics.Error.
| weights | Array of label weights for the labels of the classifier (see eVision.EasyDeepLearning.EDeepLearningTool.GetLabel) |
| bool eVision.EasyDeepLearning.EClassificationMetrics.IsValid | ( | self | ) |
Indicates whether the object contains at least one classification result.
| None eVision.EasyDeepLearning.EClassificationMetrics.Load | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Loads a classification metric.
The given eVision.ESerializer must have been created for reading.
| serializer | The serializer. |
| None eVision.EasyDeepLearning.EClassificationMetrics.Load | ( | self, | |
| str | path ) |
Loads a classification metric.
The given eVision.ESerializer must have been created for reading.
| path | The file path. |
| None eVision.EasyDeepLearning.EClassificationMetrics.Save | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Saves a classification metric.
The given eVision.ESerializer must have been created for writing.
| serializer | The eVision.ESerializer object that is written to. |
| None eVision.EasyDeepLearning.EClassificationMetrics.Save | ( | self, | |
| str | path ) |
Saves a classification metric.
The given eVision.ESerializer must have been created for writing.
| path | The file path. |