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

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

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

Public Member Functions

 EUnsupervisedSegmenterMetrics ()
 Constructs an EUnsupervisedSegmenterMetrics object.
 EUnsupervisedSegmenterMetrics (eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics other)
 Copy constructor of an EUnsupervisedSegmenterMetrics object.
bool IsTotallyUnsupervised ()
 Whether this metrics has results from only good images (true) or from both good and defective images (false).
bool IsValid ()
 Indicates whether the object contains at least one result.
override void Load (string path)
 Loads an unsupervised segmentation metric. The given ESerializer must have been created for reading.
override void Load (eVision.ESerializer serializer)
 Loads an unsupervised segmentation metric. The given ESerializer must have been created for reading.
override void Save (string path)
 Saves an unsupervised segmentation metric. The given ESerializer must have been created for writing.
override void Save (eVision.ESerializer serializer)
 Saves an unsupervised segmentation metric. The given ESerializer must have been created for writing.
void AddResult (eVision.EasyDeepLearning.EUnsupervisedSegmenterResult result, bool isGoodImage)
 Adds the given result with the corresponding ground truth label to the metrics.
void AddErrorResult (eVision.EasyDeepLearning.EUnsupervisedSegmenterResult result)
 Adds the given result to the metric for error computation. The result must be computed from a good image that was corrupted during training.
void RemoveResult (eVision.EasyDeepLearning.EUnsupervisedSegmenterResult result, bool isGoodImage)
 Removes the given result with the corresponding ground truth label to the metrics.
void RemoveErrorResult (eVision.EasyDeepLearning.EUnsupervisedSegmenterResult result)
 Removes the given result from the metric for error computation. The result must be computed from a good image that was corrupted during training.
void AddMetrics (eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics other)
 Adds the other metrics to the current metrics of this object.
new float GetBestWeightedAccuracy (float goodWeight, float badWeight)
 Best achievable weighted accuracy.
float GetBestWeightedAccuracy (eVision.EasyDeepLearning.EDataset dataset)
 Best achievable weighted accuracy.
new float GetBestWeightedAccuracyClassificationThreshold (float goodWeight, float badWeight)
 Classification threshold giving the best achievable weighted accuracy (see EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracy).
float GetBestWeightedAccuracyClassificationThreshold (eVision.EasyDeepLearning.EDataset dataset)
 Classification threshold giving the best achievable weighted accuracy (see EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracy).
Public Member Functions inherited from eVision.EasyDeepLearning.EDeepLearningDefectDetectionMetrics
 EDeepLearningDefectDetectionMetrics ()
 Constructs an empty EDeepLearningDefectDetectionMetrics object.
 EDeepLearningDefectDetectionMetrics (eVision.EasyDeepLearning.EDeepLearningDefectDetectionMetrics other)
 Copy constructor.
bool IsDefectDetectionMetricsValid ()
 Whether the defect detection metrics are valid or not. Defect detection metrics are completely valid when the metrics has results for at least one good and one defective images. Some metrics might be valid with only defective or good results.
float GetAccuracy (int index)
 The accuracy of the segmenter.
float GetAccuracy ()
 The accuracy of the segmenter.
float GetBestWeightedAccuracy (float goodWeight, float badWeight)
 Best achievable weighted accuracy.
float GetBestWeightedAccuracyClassificationThreshold (float goodWeight, float badWeight)
 Classification threshold giving the best achievable weighted accuracy (see EDeepLearningDefectDetectionMetrics.GetBestWeightedAccuracy).
uint GetConfusion (eVision.EasyDeepLearning.EConfusionMatrixElement element, int index)
 Confusion value of one label with another.
uint GetConfusion (eVision.EasyDeepLearning.EConfusionMatrixElement element)
 Confusion value of one label with another.
float GetRecall (int index)
 Recall for the current threshold.
float GetRecall ()
 Recall for the current threshold.
float GetPrecision (int index)
 Precision for the current threshold.
float GetPrecision ()
 Precision for the current threshold.
float GetFScore (int index)
 The F1-Score for the current threshold.
float GetFScore ()
 The F1-Score for the current threshold.
eVision.EasyDeepLearning.EROCPoint GetPrecisionRecallCurvePoint (int index)
 Get a point on the precision/recall curve.
eVision.EasyDeepLearning.EROCPoint GetPrecisionRecallCurvePoint ()
 Get a point on the precision/recall curve.
eVision.EasyDeepLearning.EROCPoint GetROCPoint (int index)
 ROC (Receiver Operating Characteristic) point.
eVision.EasyDeepLearning.EROCPoint GetROCPoint ()
 ROC (Receiver Operating Characteristic) point.

Properties

float Error [get]
 The error of the segmenter.
float AverageScoreOnGoodImages [get]
 Gets the average score of good images.
float AverageScoreOnDefectiveImages [get]
 Gets the average score of defective images.
Properties inherited from eVision.EasyDeepLearning.EDeepLearningDefectDetectionMetrics
int NumDefectiveSample [get]
 Number of defective sample added to the metric.
int NumGoodSample [get]
 Number of good sample added to the metric.
float BestAccuracy [get]
 Best achievable accuracy.
float BestBalancedAccuracy [get]
 Best achievable balanced accuracy.
float BestAccuracyClassificationThreshold [get]
 Classification threshold giving the best achievable accuracy (see EDeepLearningDefectDetectionMetrics.BestAccuracy).
float BestBalancedAccuracyClassificationThreshold [get]
 Classification threshold giving the best achievable balanced accuracy (see EDeepLearningDefectDetectionMetrics.BestBalancedAccuracy).
float AreaUnderROCCurve [get]
 The area under ROC curve (AUC) of the classifier (see EDeepLearningDefectDetectionMetrics.GetROCPoint). It's value is between 0 and 1.
float AveragePrecision [get]
 Average precision.
float BestFScore [get]
 Best F1-Score.
float BestFScoreThreshold [get]
 Classification threshold that yields the best F1-Score.
int PrecisionRecallCurveIndex [get]
 Index in the precision/recall curve for the current EDeepLearningDefectDetectionMetrics.ClassificationThreshold.
int NumPrecisionRecallCurvePoint [get]
 Number of point in the precision/recall curve.
int NumberOfClassifiers [get]
 Number of different possible classifiers.
float ClassificationThreshold [get, set]
 Classification threshold.

Detailed Description

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

A metric is a value summarizing the quality of a collection of unsupervised segmentation results (see EUnsupervisedSegmenterResult) with respect to their ground truth. New results can be added to the object individually with EUnsupervisedSegmenterMetrics.AddResult or collectively with EUnsupervisedSegmenterMetrics.AddMetrics.

EUnsupervisedSegmenterMetrics contains two types of metrics: unsupervised metrics that are computed only on good images and supervised/defect detection metrics that are computed on both good and bad images. The defect detection metrics are accessible only when results for bad images were added to the object. When supervised metrics are accessible, EUnsupervisedSegmenterMetrics.IsTotallyUnsupervised is false.

There is only one unsupervised metric: the error (see EUnsupervisedSegmenterMetrics.Error). See EDeepLearningDefectDetectionMetrics for a description of the defect detection metrics.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EUnsupervisedSegmenterMetrics() [1/2]

eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.EUnsupervisedSegmenterMetrics ( )

Constructs an EUnsupervisedSegmenterMetrics object.

◆ EUnsupervisedSegmenterMetrics() [2/2]

eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.EUnsupervisedSegmenterMetrics ( eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics other)

Copy constructor of an EUnsupervisedSegmenterMetrics object.

Parameters
otherReference to the EUnsupervisedSegmenterMetrics object that should be copied

Member Function Documentation

◆ AddErrorResult()

void eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.AddErrorResult ( eVision.EasyDeepLearning.EUnsupervisedSegmenterResult result)

Adds the given result to the metric for error computation. The result must be computed from a good image that was corrupted during training.

Parameters
resultA reference to an EUnsupervisedSegmenterResult object.

◆ AddMetrics()

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

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

Parameters
otherUnsupervised segmenter metrics

◆ AddResult()

void eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.AddResult ( eVision.EasyDeepLearning.EUnsupervisedSegmenterResult result,
bool isGoodImage )

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

Parameters
resultA reference to an EUnsupervisedSegmenterResult object.
isGoodImageTrue if the ground truth of this result is good, else false.

◆ GetBestWeightedAccuracy() [1/2]

float eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracy ( eVision.EasyDeepLearning.EDataset dataset)

Best achievable weighted accuracy.

The weighted accuracy is the weighted average of the true positive rate and the true negative rate (which is equal to 1 minus the false positive rate). See EROCPoint.

The classification threshold corresponding to this accuracy is given by EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracyClassificationThreshold.

Parameters
datasetDataset to get the label weight from.

When using a dataset as the source for the label weights, the good weight is the weight of the "good" label and the bad weight is the sum of the weights of all the other labels.

◆ GetBestWeightedAccuracy() [2/2]

new float eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracy ( float goodWeight,
float badWeight )

Best achievable weighted accuracy.

The weighted accuracy is the weighted average of the true positive rate and the true negative rate (which is equal to 1 minus the false positive rate). See EROCPoint.

The classification threshold corresponding to this accuracy is given by EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracyClassificationThreshold.

Parameters
goodWeightweight of the good label.
badWeightweight of the bad label.

When using a dataset as the source for the label weights, the good weight is the weight of the "good" label and the bad weight is the sum of the weights of all the other labels.

◆ GetBestWeightedAccuracyClassificationThreshold() [1/2]

float eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracyClassificationThreshold ( eVision.EasyDeepLearning.EDataset dataset)

Classification threshold giving the best achievable weighted accuracy (see EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracy).

Parameters
datasetDataset to get the label weight from.

◆ GetBestWeightedAccuracyClassificationThreshold() [2/2]

new float eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracyClassificationThreshold ( float goodWeight,
float badWeight )

Classification threshold giving the best achievable weighted accuracy (see EUnsupervisedSegmenterMetrics.GetBestWeightedAccuracy).

Parameters
goodWeightWeight for the good label
badWeightWeight for the bad label

◆ IsTotallyUnsupervised()

bool eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.IsTotallyUnsupervised ( )

Whether this metrics has results from only good images (true) or from both good and defective images (false).

Some metrics are accessible only if EUnsupervisedSegmenterMetrics.IsTotallyUnsupervised is false.

◆ IsValid()

bool eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.IsValid ( )

Indicates whether the object contains at least one result.

◆ Load() [1/2]

override void eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.Load ( eVision.ESerializer serializer)
virtual

Loads an unsupervised segmentation metric. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

Reimplemented from eVision.EasyDeepLearning.EDeepLearningDefectDetectionMetrics.

◆ Load() [2/2]

override void eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.Load ( string path)
virtual

Loads an unsupervised segmentation metric. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

Reimplemented from eVision.EasyDeepLearning.EDeepLearningDefectDetectionMetrics.

◆ RemoveErrorResult()

void eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.RemoveErrorResult ( eVision.EasyDeepLearning.EUnsupervisedSegmenterResult result)

Removes the given result from the metric for error computation. The result must be computed from a good image that was corrupted during training.

Parameters
resultA reference to an EUnsupervisedSegmenterResult object.

◆ RemoveResult()

void eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.RemoveResult ( eVision.EasyDeepLearning.EUnsupervisedSegmenterResult result,
bool isGoodImage )

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

Parameters
resultA reference to an EUnsupervisedSegmenterResult object.
isGoodImageTrue if the ground truth of this result is good, else false.

◆ Save() [1/2]

override void eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.Save ( eVision.ESerializer serializer)
virtual

Saves an unsupervised segmentation metric. The given ESerializer must have been created for writing.

Parameters
serializerThe serializer.

Reimplemented from eVision.EasyDeepLearning.EDeepLearningDefectDetectionMetrics.

◆ Save() [2/2]

override void eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.Save ( string path)
virtual

Saves an unsupervised segmentation metric. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

Reimplemented from eVision.EasyDeepLearning.EDeepLearningDefectDetectionMetrics.

Property Documentation

◆ AverageScoreOnDefectiveImages

float eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.AverageScoreOnDefectiveImages
get

Gets the average score of defective images.

◆ AverageScoreOnGoodImages

float eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.AverageScoreOnGoodImages
get

Gets the average score of good images.

◆ Error

float eVision.EasyDeepLearning.EUnsupervisedSegmenterMetrics.Error
get

The error of the segmenter.

This metric is only available in the metrics computed during a training which are accessible through EUnsupervisedSegmenter.GetValidationMetrics.

The error, which is also called the loss, is the quantity that is minimized during the training of the deep neural network.