# Metrics Related to Confusion Matrix as Tools for Conformity Assessment Decisions
## 4 Conclusions  
Conformity assessment is a procedure that verifies whether a product meets the required specifications or not. The check is carried out based on measurements with the calculation of the risk of a wrong decision, either that decision refers to accepting a non-conforming product or rejecting a product that conforms to specifications.  
Until now, the formulas for calculating the global risk of the producer and the global risk of the consumer have not been observed in the light of machine learning as binary classifiers that can be used to classify products into characteristic categories of confusion matrices. Although in the main document [1] of the International Bureau of Weights and Measures (Bureau International des Poids et Mesures, BIPM) there are examples in which such a classification is partially implemented, the possibility of applying this method is not widely recognized. Classification, unlike machine learning, is performed without the training set and test set based on sample characteristics obtained by measurement, as well as associated measurement uncertainties. Moreover, the method enables the construction of curves for metrics associated with confusion matrices. Using these curves, it is possible to analyze and compare the behavior of the model and determine the optimal length of the guard band.  
The characteristic metrics associated with the confusion matrices were used to compare two models for which the conformity of the measured inner diameter of the ring with the given specifications is assessed. Based on the behavior of the MCC metric, it was estimated that it is optimal to set the length of the guard band to the value that corresponds to the point of intersection of the MCC curves of the initial and improved model. Choosing the optimal length of the guard band, and determining the acceptance interval, is based on the condition of achieving the minimal global risk of the producer and consumer. The negative value of the guard band for which \(MCC_{In}=MCC_{Im}\) holds corresponds to the minimization of the global producer's risk. A positive value of the guard band corresponds to the model of minimization of the global consumer's risk.  
The assessment of global producer's and consumer's risk is a method that can be utilized in numerous areas. Combining this method with machine-learning techniques provides a new dimension when evaluating the conformity of products to specified standards. In future work, it remains to be seen how the metrics associated with the confusion matrices behave for centered and non-centered models. It is also necessary to investigate the behavior of metrics with respect to different values of the measurement uncertainties associated with the prior and likelihood function, as well as the behavior of the metrics that were not included in this study.  
Conceptualization, D.B. and B.R.; methodology, D.B. and D.L.; software, D.B.; validation, B.R., D.L. and D.K.; formal analysis, D.B. and D.K.; investigation, D.B. and B.R.; resources, D.K. and D.L.; data curation, D.K.; writing--original draft preparation, D.B.; writing--review and editing, B.R. and D.L.; visualization, D.K.; supervision, B.R.; project administration, D.K.; funding acquisition, D.L. All authors have read and agreed to the published version of the manuscript.  
The Article Processing Charges (APCs) is funded by the European Regional Development Fund, grant number KK.01.1.1.07.0031.