eVision .NET API
Loading...
Searching...
No Matches
eVision.EasyDeepLearning.EClassificationMetrics Class Reference

Collection of metrics used to evaluate the state of an EClassifier. More...

Inheritance diagram for eVision.EasyDeepLearning.EClassificationMetrics:
Collaboration diagram for eVision.EasyDeepLearning.EClassificationMetrics:

Public Member Functions

 EClassificationMetrics ()
 Constructs an EClassificationMetrics object.
 EClassificationMetrics (eVision.EasyDeepLearning.EClassificationMetrics other)
 Copy constructor of an EClassificationMetrics object.
void Load (string path)
 Loads a classification metric. The given ESerializer must have been created for reading.
void Load (eVision.ESerializer serializer)
 Loads a classification metric. The given ESerializer must have been created for reading.
void Save (string path)
 Saves a classification metric. The given ESerializer must have been created for writing.
void Save (eVision.ESerializer serializer)
 Saves a classification metric. The given ESerializer must have been created for writing.
bool IsValid ()
 Indicates whether the object contains at least one classification result.
void AddResult (eVision.EasyDeepLearning.EClassificationResult result, string groundtruthLabel)
 Adds the given result with the corresponding ground truth label to the metrics.
void AddMetrics (eVision.EasyDeepLearning.EClassificationMetrics other)
 Adds the other metrics to the current metrics of this object.
float GetWeightedAccuracy (float[] weights)
 The label weighted accuracy.
float GetWeightedAccuracy (eVision.EasyDeepLearning.EDataset dataset)
 The label weighted accuracy.
float GetLabelAccuracy (string label)
 The accuracy of the classifier for a given label.
float GetWeightedError (float[] weights)
 The label weighted error.
float GetWeightedError (eVision.EasyDeepLearning.EDataset dataset)
 The label weighted error.
float GetLabelError (string label)
 The error of the classifier for a given label.
bool CanComputeWeightedError ()
 Whether the object can be used to get weighted, balanced, and label errors.
uint GetConfusion (string trueClass, string predictedClass)
 Confusion value of one label with another.

Properties

float Accuracy [get]
 The accuracy of the classifier.
float BalancedAccuracy [get]
 The balanced accuracy.
float Error [get]
 The error of the classifier.
float BalancedError [get]
 The balanced error.

Detailed Description

Collection of metrics used to evaluate the state of an EClassifier.

A metric is a value summarizing a collection of classification results (EClassificationResult). New results can be added to the object individually with EClassificationMetrics.AddResult or collectively with EClassificationMetrics.AddMetrics.

EClassificationMetrics contains the following metrics:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EClassificationMetrics() [1/2]

eVision.EasyDeepLearning.EClassificationMetrics.EClassificationMetrics ( )

Constructs an EClassificationMetrics object.

◆ EClassificationMetrics() [2/2]

eVision.EasyDeepLearning.EClassificationMetrics.EClassificationMetrics ( eVision.EasyDeepLearning.EClassificationMetrics other)

Copy constructor of an EClassificationMetrics object.

Parameters
otherReference to the EClassificationMetrics object that should be copied

Member Function Documentation

◆ AddMetrics()

void eVision.EasyDeepLearning.EClassificationMetrics.AddMetrics ( eVision.EasyDeepLearning.EClassificationMetrics other)

Adds the other metrics to the current metrics of this object.

Parameters
otherClassification metrics

◆ AddResult()

void eVision.EasyDeepLearning.EClassificationMetrics.AddResult ( eVision.EasyDeepLearning.EClassificationResult result,
string groundtruthLabel )

Adds the given result with the corresponding ground truth label to the metrics.

Parameters
resultA reference to an EClassificationResult object.
groundtruthLabelThe ground truth label corresponding to the result

◆ CanComputeWeightedError()

bool eVision.EasyDeepLearning.EClassificationMetrics.CanComputeWeightedError ( )

Whether the object can be used to get weighted, balanced, and label errors.

◆ GetConfusion()

uint eVision.EasyDeepLearning.EClassificationMetrics.GetConfusion ( string trueClass,
string 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.

Parameters
trueClassThe label for which to obtain the confusion value
predictedClassThe label with which there is a confusion

◆ GetLabelAccuracy()

float eVision.EasyDeepLearning.EClassificationMetrics.GetLabelAccuracy ( string label)

The accuracy of the classifier for a given label.

Parameters
labelThe label of which we want the accuracy

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.

◆ GetLabelError()

float eVision.EasyDeepLearning.EClassificationMetrics.GetLabelError ( string label)

The error of the classifier for a given label.

Parameters
labelThe label from which to get the error.

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 EClassificationMetrics.CanComputeWeightedError is false, this method is an alias for EClassificationMetrics.Error.

◆ GetWeightedAccuracy() [1/2]

float eVision.EasyDeepLearning.EClassificationMetrics.GetWeightedAccuracy ( eVision.EasyDeepLearning.EDataset dataset)

The label weighted accuracy.

Parameters
datasetDataset from which to use the label weights

The weighted accuracy is the weighted average of the label accuracies (see EClassificationMetrics.GetLabelAccuracy). If there is no results for a given label, it will be ignored in the weighted accuracy.

◆ GetWeightedAccuracy() [2/2]

float eVision.EasyDeepLearning.EClassificationMetrics.GetWeightedAccuracy ( float[] weights)

The label weighted accuracy.

Parameters
weightsArray of label weights for the labels of the classifier (see EDeepLearningTool.GetLabel)

The weighted accuracy is the weighted average of the label accuracies (see EClassificationMetrics.GetLabelAccuracy). If there is no results for a given label, it will be ignored in the weighted accuracy.

◆ GetWeightedError() [1/2]

float eVision.EasyDeepLearning.EClassificationMetrics.GetWeightedError ( eVision.EasyDeepLearning.EDataset dataset)

The label weighted error.

Parameters
datasetDataset from which to use the label weights

The weighted error is the weighted average of the label errors (see EClassificationMetrics.GetLabelError).

If there isn't any result for a given label, it will be ignored in the weighted error.

If EClassificationMetrics.CanComputeWeightedError is false, this method is an alias for EClassificationMetrics.Error.

◆ GetWeightedError() [2/2]

float eVision.EasyDeepLearning.EClassificationMetrics.GetWeightedError ( float[] weights)

The label weighted error.

Parameters
weightsArray of label weights for the labels of the classifier (see EDeepLearningTool.GetLabel)

The weighted error is the weighted average of the label errors (see EClassificationMetrics.GetLabelError).

If there isn't any result for a given label, it will be ignored in the weighted error.

If EClassificationMetrics.CanComputeWeightedError is false, this method is an alias for EClassificationMetrics.Error.

◆ IsValid()

bool eVision.EasyDeepLearning.EClassificationMetrics.IsValid ( )

Indicates whether the object contains at least one classification result.

◆ Load() [1/2]

void eVision.EasyDeepLearning.EClassificationMetrics.Load ( eVision.ESerializer serializer)

Loads a classification metric. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

void eVision.EasyDeepLearning.EClassificationMetrics.Load ( string path)

Loads a classification metric. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Save() [1/2]

void eVision.EasyDeepLearning.EClassificationMetrics.Save ( eVision.ESerializer serializer)

Saves a classification metric. The given ESerializer must have been created for writing.

Parameters
serializerThe ESerializer object that is written to.

◆ Save() [2/2]

void eVision.EasyDeepLearning.EClassificationMetrics.Save ( string path)

Saves a classification metric. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

Property Documentation

◆ Accuracy

float eVision.EasyDeepLearning.EClassificationMetrics.Accuracy
get

The accuracy of the classifier.

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.

◆ BalancedAccuracy

float eVision.EasyDeepLearning.EClassificationMetrics.BalancedAccuracy
get

The balanced accuracy.

The balanced accuracy is the label weighted accuracy with the same weight for each labels.

◆ BalancedError

float eVision.EasyDeepLearning.EClassificationMetrics.BalancedError
get

The balanced error.

The balanced error is the label weighted error with the same weight for each labels.

If EClassificationMetrics.CanComputeWeightedError is false, this method is an alias for EClassificationMetrics.Error.

◆ Error

float eVision.EasyDeepLearning.EClassificationMetrics.Error
get

The error of the classifier.

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.