Submitted:
27 November 2023
Posted:
28 November 2023
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Literature Review
2.1. Data Sampling Method
2.2. Voting Ensemble Model
2.3. Explainable Artificial Intelligence
3. Materials and Methods
3.1. Study Process
3.2. Data Sources
3.3. Data Preprocessing
3.4. Model Construction
3.4.1. Feature Selection
3.4.2. Spliting of the Data into Training and Testing Datasets
3.4.3. Modelling
3.4.4. Model Evaluation
- The accuracy rate (ACR) evaluates the model’s overall capacity to differentiate between conformity and non-conformity samples or the ability to accurately classify samples as conformity. However, owing to the lower proportion of non-conformities in our data, there was an imbalance in the samples considered herein. Because of its higher capacity for discriminating conformities, ACR may show bias in predicting conformities. To overcome this problem, the recall and PPV indicators have received greater attention during the evaluation of model performance. The ACR can be calculated using (2):
- The recall or sensitivity is the proportion of samples correctly labeled as non-conformity out of all non-conformity samples, as shown in (3):
- The positive predictive value (PPV), also known as precision, is the proportion of samples that the model classifies as non-conformity out of all samples, and is otherwise referred to as the non-conformity rate. The PPV can be calculated using (4):
- The F1 score, defined as the harmonic mean of the recall and PPV indicators, becomes crucial when dealing with imbalanced data. Higher TP values correlate with higher F1 scores, and the F1 score can be calculated using (5):
- The model’s classification accuracy can be measured from the area under the receiver operating characteristic (ROC) curve (AUC), wherein a larger AUC denotes a higher accuracy. More specifically, AUC = 1 represents a great classifier, 0.5 < AUC < 1 represents a model that outperforms random guessing, AUC = 0.5 represents a model that is similar to random guessing but lacks classification capacity, and AUC < 0.5 represents a classifier that performs worse than random guessing. According to the explanation above, recall and AUC scores play an important role in the model evaluation. The higher scores show that the higher chance model can correctly identify the non-conformity class.
3.5. Explainable AI
4. Results
4.1. Comparisions of the Ensemble Model Performance
4.2. Identification of the Importance of Features Using XAI
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Marvin, H.J.; Janssen, E.M.; Bouzembrak, Y.; Hendriksen, P.J.; Staats, M. Big data in food safety: An overview. Critical reviews in food science and nutrition 2017, 57, 2286–2295. [Google Scholar] [CrossRef] [PubMed]
- Bouzembrak, Y.; Marvin, H.J. Prediction of food fraud type using data from Rapid Alert System for Food and Feed (RASFF) and Bayesian network modelling. Food Control 2016, 61, 180–187. [Google Scholar] [CrossRef]
- Wu, L.Y.; Weng, S.S. Ensemble learning models for food safety risk prediction. Sustainability 2021, 13, 12291. [Google Scholar] [CrossRef]
- Park, J.; Lee, W.H.; Kim, K.T.; Park, C.Y.; Lee, S.; Heo, T.Y. Interpretation of ensemble learning to predict water quality using explainable artificial intelligence. Science of the Total Environment 2022, 832, 155070. [Google Scholar] [CrossRef] [PubMed]
- Hellen, N.; Sabuj, H.H.; Ashraful Alam, M. Explainable AI and Ensemble Learning for Water Quality Prediction. Proceedings of International Conference on Information and Communication Technology for Development: ICICTD 2022; Springer, 2023; pp. 235–250. [Google Scholar]
- Gong, H.; Wang, M.; Zhang, H.; Elahe, M.F.; Jin, M. An explainable AI approach for the rapid diagnosis of COVID-19 using ensemble learning algorithms. Frontiers in Public Health 2022, 10, 874455. [Google Scholar] [CrossRef] [PubMed]
- Saraswat, D.; Bhattacharya, P.; Verma, A.; Prasad, V.K.; Tanwar, S.; Sharma, G.; Bokoro, P.N.; Sharma, R. Explainable AI for healthcare 5.0: opportunities and challenges. IEEE Access 2022. [Google Scholar] [CrossRef]
- Ji-hyun, J.L. Last year, seafood exports increased by 5.85.4. Available online: https://www.foodnews.co.kr/news/articleView.html?idxno=72633 (accessed on 26 July 2023).
- Lundberg, S.M.; Lee, S.I. A unified approach to interpreting model predictions. Advances in neural information processing systems 2017, 30. [Google Scholar]
- Kotsiantis, S.; Kanellopoulos, D.; Pintelas, P.; others. Handling imbalanced datasets: A review. GESTS international transactions on computer science and engineering 2006, 30, 25–36. [Google Scholar]
- Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: synthetic minority over-sampling technique. Journal of artificial intelligence research 2002, 16, 321–357. [Google Scholar] [CrossRef]
- Han, H.; Wang, W.Y.; Mao, B.H. Borderline-SMOTE: a new over-sampling method in imbalanced data sets learning. In International conference on intelligent computing; Springer, 2005; pp. 878–887. [Google Scholar]
- Nguyen, H.M.; Cooper, E.W.; Kamei, K. Borderline over-sampling for imbalanced data classification. International Journal of Knowledge Engineering and Soft Data Paradigms 2011, 3, 4–21. [Google Scholar] [CrossRef]
- Bamhdi, A.M.; Abrar, I.; Masoodi, F. An ensemble based approach for effective intrusion detection using majority voting. TELKOMNIKA (Telecommunication Computing Electronics and Control) 2021, 19, 664. [Google Scholar] [CrossRef]
- Brownlee, J. Ensemble Learning Methods for Deep Learning Neural Networks - MachineLearningMastery.com — machinelearningmastery.com. Available online: https://machinelearningmastery.com/ensemble-methods-for-deep-learning-neural-networks/ (accessed on 26 July 2023).
- Arrieta, A.B.; Díaz-Rodríguez, N.; Del Ser, J.; Bennetot, A.; Tabik, S.; Barbado, A.; García, S.; Gil-López, S.; Molina, D.; Benjamins, R.; others. Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Information fusion 2020, 58, 82–115. [Google Scholar] [CrossRef]
- Ministry of Food and Drug Safety. Available online: https://impfood.mfds.go.kr/ (accessed on 26 July 2023).
- St, L.; Wold, S.; others. Analysis of variance (ANOVA). Chemometrics and intelligent laboratory systems 1989, 6, 259–272. [Google Scholar]
- Myles, A.J.; Feudale, R.N.; Liu, Y.; Woody, N.A.; Brown, S.D. An introduction to decision tree modeling. Journal of Chemometrics: A Journal of the Chemometrics Society 2004, 18, 275–285. [Google Scholar] [CrossRef]
- Rigatti, S.J. Random forest. Journal of Insurance Medicine 2017, 47, 31–39. [Google Scholar] [CrossRef] [PubMed]
- LaValley, M.P. Logistic regression. Circulation 2008, 117, 2395–2399. [Google Scholar] [CrossRef] [PubMed]
- Sammut, C.; Webb, G.I. Encyclopedia of machine learning. Springer Science & Business Media, 2011. [Google Scholar]
- Ling, C.X.; Sheng, V.S. Cost-sensitive learning and the class imbalance problem. Encyclopedia of machine learning 2008, 2011, 231–235. [Google Scholar]
- Rish, I.; others. An empirical study of the naive Bayes classifier. IJCAI 2001 workshop on empirical methods in artificial intelligence; 2001; 3, pp. 41–46.




| Original Variable | Derived Variable | Description |
|---|---|---|
| Receipt date | Month | Represents the year and month when the report was received. |
| Week | Represents the year and week when the report was received. | |
| Season | Spring, Summer, Fall, or Winter. | |
| Import Shipper | Import Shipper | The importer. |
| Import Shipper Failed Ratio | The previous failed ratio of the relevant importer. | |
| Exporting Country | Exporting Country | The country from which the product is being exported. |
| Continent | The continent of the exporting country. | |
| Exporting Country Failed Ratio | The previous failed ratio of the relevant exporting country. | |
| Continent Failed Ratio | The previous failed ratio of the relevant continent. | |
| Overseas Manufacturer | Overseas Manufacturer | The foreign company responsible for producing the goods. |
| Overseas Manufacturer Failed Ratio | The previous failed ratio of the relevant overseas manufacturer. | |
| Exporter | Exporter | The company or party that is responsible for exporting the goods from the originating country. |
| Exporter Ratio | The previous failed ratio of the relevant exporter. | |
| Major Product Category | Major Product Category | The major product category of the goods. |
| Major Product Category Failed Ratio | The previous failed ratio of the relevant major product category. | |
| Sub Product Category | Sub Product Category | The sub-product category of the goods. |
| Sub Product Category Ratio | The previous failed ratio of the relevant sub-product category. | |
| Product Name | Product Name | The specific name or description of the products being imported/exported. |
| Product Name Failed Ratio | The previous failed ratio of the relevant product name. | |
| Keywords | Search product name & non-conformity keywords. | |
| Total Net Weight | Total Net Weight | The total net weight of the products being imported/exported. |
| Distribution Method | Distribution Method | The distribution method. |
| Type of Inspection | Type of Inspection | The type of inspection conducted on the products. |
| Processing Result | Processing Result | The outcome or result of the inspection of the shipment. |
| Entry Type | Definition |
|---|---|
| True Positive (TP) | Predicted inspection result for the product by model classification: non-conformity; actual inspection result: non-conformity |
| False Positive (FP) | Predicted inspection result for the product batch by model classification: non-conformity; actual inspection result: conformity |
| True Negative (TN) | Predicted inspection result for the product batch by model classification: conformity; actual inspection result: conformity |
| False Negative (FN) | Predicted inspection result for the product by model classification: conformity; actual inspection result: non-conformity |
| Voting Method | ACR | Recall | PPV | F1 | AUC | TN | FP | TP | FN |
|---|---|---|---|---|---|---|---|---|---|
| Soft Voting | 99.35% | 75.57% | 22.32% | 34.46% | 87.49% | 77,239 | 463 | 133 | 43 |
| Hard Voting | 99.69% | 44.32% | 35.62% | 39.49% | 72.07% | 77,561 | 141 | 78 | 98 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).