The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



OptimizeThresholds


Unit: SDL_statis
Class: TCFEvaluator
Declaration: function OptimizeThresholds (var ROCCoords: TDouble2DArray; var BestROC: integer; var AUC, ThreshMMC, ThreshAccuracy, ThreshInformedness: double): integer;

The method OptimizeThresholds calculates the ROC (receiver operating characteristics) curve, its optimum, the AUC, and several optimum thresholds. The ROC curve is returned as the open 3xN array ROCCoords containing the following information:
column 0 ... false positive rates
column 1 ... true positive rates
column 2 ... corresponding thresholds
The parameter BestROC returns the index to the optimum ROC value. Thus the point {ROCCoords[0,BestROC],ROCCoords[1,BestROC]} is the optimum point on the ROC curve, the cell ROCCoords[2,BestROC] contains the corresponding threshold.

The parameter AUC returns the area under the ROC curve. The parameters ThreshMMC, ThreshAccuracy and ThreshInformedness return the optimum thresholds for maximizing the Matthews correlation coeffient, the accuracy or the informedness, respectively.

The function returns the following error codes:

 0 ... everything is OK
-1 ... the actual data (property TrueData) is not dichotomous
-2 ... all values of the actual data have the same values
-3 ... the estimated data and the actual data vectors do not have the same length


Last Update: 2020-Apr-25