# Classification Performance of Thresholding Methods in the Mahalanobis-Taguchi System
## 2 The Concept of Mahalanobis Distance (MD)
### ROC Curve Method  
The history of Receiver Operating Characteristics (ROC) is dated back to the World War II-era with which the radar operators used this theory to decide whether a blip on the radar receiving screen indicated an enemy battleship, a friendly allied asset, or just a \"noise\". This signal detection theory was firstly popularized outside the military world by [33] in the area of phycology and over the years, the theory has been widely used in various disciplines including electronic signal detection, medical prognosis and diagnosis as well as data mining application for classification purposes [34].  
In the context of the classification problem of MTS, ref. [9] deploys ROC in software defect diagnosis based on a multivariate set of software metrics and attributes by incorporating sensitivity and specificity metrics in the training dataset as the threshold value (see Figure 5). Sensitivity is defined as the proportion of actual positive class which is correctly identified as such while Specificity is the proportion of the negative class, which is correctly identified as negative such that:  
\[Sensitivity=\frac{TP}{FN+TP},\quad Specificity=\frac{TN}{FP+TN} \tag{16}\]  
Note that in Figure 5, the \(x\)-axis of the diagram uses \"1-specificity\" metric to denote a false positive value of the classifier. Thus, the aim is to determine the area under the curve of the model classifier of which the bigger the area the better. In other words, the closer the model classifier line (represented by the red-dotted curvy line) to the prefect classifier shape (represented by the blue-dotted line) the better chance of the model to classify all the samples correctly according to their respective classes. Thus, ref. [9] aims to find the MDT value that maximizes the area under the curve of the MTS classifier.  
Using area under the ROC curve to determine a threshold value, however, could be misleading since any two ROC curves may have different shapes but they could have identical areas under the curve [35]. Thus, ref. [11] proposed instead of maximizing the area under the curve, minimizing the Euclidean Distance from any point of the classifier curve to the maximum theoretical threshold value (i.e., maximum true positive rate) is sought. Figure 6 illustrates the approach by taking the examples of an \"A\" as the maximum sensitivity value while points B, C, D and E represent four different points on the MTS classifier curve.  
Figure 5: Receiver Operating Characteristics (ROC) diagram incorporating Sensitivity and 1-Specificity.  
Thus, from Figure 6, the distances between the points (4 points in this example, \(d_{AB}\), \(d_{AC}\), \(d_{AD}\) and \(d_{AE}\)) to point A are calculated. The closer the classifier performance to point A is, the better it is. Changing the threshold will change the point coordinate on the curve. Therefore, the problem of finding the optimum threshold can be reformulated into the problem of finding the closest point that lies on the curve to point A given:  
\[TPR=\frac{TP}{FN+TP},\quad FPR=\frac{FP}{TN+FP} \tag{17}\]  
And thus, the optimum MDT is established by obtaining the shortest Euclidean Distance such that:  
\[min\ d_{A.MD_{T}}=\sqrt[2]{\left(FPR^{A}-FPR^{MD_{T}}\right)^{2}+\left(TPR^{A}- TPR^{MD_{T}}\right)^{2}} \tag{18}\]  
where \(d_{AMDT}\) is Euclidean Distance between point A and any point of MDT that lies on the ROC curve such as points B, C, D or E illustrated in the example of Figure 6. \(FPR^{A}\) is the false positive rate at point A which is equal to zero. \(TPR^{A}\) is the true positive rate at point A which is equal to one while \(FPR^{MDT}\) is the false positive rate at the threshold MDT. \(TPR^{MDT}\) is the true positive at threshold MDT. Thus, MDT that gives the lowest \(d_{AMDT}\) value will be taken as the optimum threshold value (MDT).