Machine Learning-Based Cow Milk Quality Classification using Recursive Feature Elimination Cross-Validation

Damar Wicaksono, Affix Mareta, Ardy Erdiyanto, Nuzula Afianah, Rafly Ramadhani

Abstract

Milk quality is of paramount importance as it directly impacts consumer health and well-being. High-quality milk is rich in essential nutrients such as calcium, protein, and vitamins, contributing to overall nutrition. Moreover, ensuring milk quality is vital for preventing the transmission of diseases and contaminants through dairy products. Therefore, research in this field is essential to guaranteeing the safety and nutritional value of milk consumed by individuals of all ages. In this paper, the design of machine learning-based grade measuring devices with recursive feature elimination with cross-validation (RFECV) is carried out as a guide in the design of a milk grade detection system. The milk is rated as low, medium, or high based on these criteria. The sensors will gather this information from the milk with the aid of the microcontroller. The algorithms utilized in this study and the results obtained from K-Nearest Neighbors (KNN) combined with the RFECV algorithm have a higher accuracy value: 17,20% better than the support vector machine (SVM) model, 25.37% better than the single K-Nearest Neighbors (KNN), and 26.37% better than the random forest (RF) model trained without RFECV. Using seven input features (pH, temperature, taste, odor, fat, turbidity, and color), the proposed model produces 96.27% accuracy.

Keywords

milk; grade; machine learning; algorithm; accuracy

Full Text:

PDF

References

1 Vidhya, S., Siva Vadivu Ragavi, V., Monica, J.K., Kanisha, B... (2023). Milk Quality Prediction Using Supervised Machine Learning Technique. In: Rathore, V.S., Piuri, V., Babo, R., Ferreira, M.C. (eds) Emerging Trends in Expert Applications and Security. ICETEAS 2023. Lecture Notes in Networks and Systems, vol 682. Springer, Singapore. https://doi.org/10.1007/978-981-99-1946-8_24.
2 Muchtadi. 1992. Petunjuk Laboratorium Ilmu Pengetahuan Bahan Pangan. Departemen Pendidikan dan Kebudayaan Direktorat Jenderal Pendidikan Tinggi Pusat Antar Universitas Pangan dan Gizi Institut Pertanian Bogor. pp 34-35.
3 Chandra, B. 2007. Pengantar Kesehatan Lingkungan. Jakarta, Penerbit Buku Kedokteran EGC
4 Wilshaw, GA, T. Cheasty, dan HR Smith, 2000. Escherichia coli. In: Lund, BM, Baird Parker, TC, Gould, GW (Eds.), The Microbiological Safety and Quality of Food II. Aspen Publishers Inc., Gaithersburg, Maryland, j.pp. 1136-1177. accessed in august 24, 2024
5 Brettschneider, K.C., Zettel, V., Vasafi, P.S. et al. Correction to: Spectroscopic Based Prediction of Milk Foam Properties for Barista Applications. Food Bioprocess Technol 15, 1758–1759 (2022). https://doi.org/10.1007/s11947-022-02850-z
6 Tosca, M.A., Olcese, R., Trincianti, C. et al. Children with cow milk allergy: prediction of oral immunotherapy response in clinical practice. Allergo J Int (2023). https://doi.org/10.1007/s40629-023-00252-x
7 Slob, N., Catal, C., & Kassahun, A. (2021). Application of machine learning to improve dairy farm management: A systematic literature review. Preventive Veterinary Medicine, 187, 105237. https://doi.org/10.1016/j.prevetmed.2020.105237
8 Frizzarin, M., Gormley, I. C., Berry, D. P., Murphy, T. B., Casa, A., Lynch, A., & McParland, S. (2021). Predicting cow milk quality traits from routinely available milk spectra using statistical machine learning methods. Journal of Dairy Science, 104(7), 7438–7447. https://doi.org/10.3168/jds.2020-19576
9 Mu, F., Gu, Y., Zhang, J., & Zhang, L. (2020). Milk Source Identification and Milk Quality Estimation Using an Electronic Nose and Machine Learning Techniques. Sensors, 20(15), 4238. https://doi.org/10.3390/s20154238
10 Jiménez-Carvelo, A. M., Sanae Bikrani, Mounir Nechar, Badredine Souhail, & Cuadros-Rodríguez, L. (2022). Machine learning–based chemometric methods for quality and authentication of milk and dairy products. Elsevier EBooks, 1(4), 261–280. https://doi.org/10.1016/b978-0-12-820478-8.00002-x
11 Fuentes, S., Gonzalez Viejo, C., Cullen, B., Tongson, E., Chauhan, S. S., & Dunshea, F. R. (2020). Artificial Intelligence Applied to a Robotic Dairy Farm to Model Milk Productivity and Quality based on Cow Data and Daily Environmental Parameters. Sensors (Basel, Switzerland), 20(10). https://doi.org/10.3390/s20102975
12 Sugiono, S., Soenoko, R., & Riawati, L. (2017). Investigating the Impact of Physiological Aspect on Cow Milk Production Using Artificial Intelligence. International Review of Mechanical Engineering-IREME, 11, 30-36.
13 Kaggle, “Milk Dataset.” https://storage.googleapis.com/kagglesdsdata/datasets/ 2380569/4016630/milknew.csv (accessed Feb. 24, 2024).
14 Jacobsen, B. N. (2023). Machine learning and the politics of synthetic data. Big Data & Society, 10(1). https://doi.org/10.1177/20539517221145372
15 Rankin, D., Black, M., Bond, R., Wallace, J., Mulvenna, M., & Epelde, G. (2020). Reliability of Supervised Machine Learning Using Synthetic Data in Health Care: Model to Preserve Privacy for Data Sharing. JMIR medical informatics, 8(7), e18910. https://doi.org/10.2196/18910
16 Baressi Šegota, S., Anđelić, N., Šercer, M., & Meštrić, H. (2022). Dynamics Modeling of Industrial Robotic Manipulators: A Machine Learning Approach Based on Synthetic Data. Mathematics, 10(7), 1174. https://doi.org/10.3390/math10071174
17 Mowri, Rawshan Ara, Siddula, M., & Roy, K. (2022). A Comparative Performance Analysis of Explainable Machine Learning Models with And Without RFECV Feature Selection Technique Towards Ransomware Classification. ArXiv (Cornell University), 4(3). https://doi.org/10.48550/arxiv.2212.04864
18 Jadhav, A., Pramod, D., & Ramanathan, K. (2019). Comparison of Performance of Data Imputation Methods for Numeric Dataset. Applied Artificial Intelligence, 33(10), 913–933. https://doi.org/10.1080/08839514.2019.1637138
19 Huang, E.-H., Hu, H.-W., Jheng, W.-L., Chen, K.-Y., Liu, C.-H., Chi, H.-Y., Chang, T.-W., Chin-Yu, W., Un, C.-H., Lin, H.-M., Chen, C.-W., & Wang, J.-F. (2021, December 1). Feature Selection for Intradialytic Blood Pressure Value Prediction Using GRU-based Method Under RFECV algorithm. IEEE Xplore. https://doi.org/10.1109/ICOT54518.2021.9680645
20 Bradley, A. P. (1997). The use of the area under the ROC curve in the evaluation of machine learning algorithms. Pattern Recognition, 30(7), 1145–1159. https://doi.org/10.1016/s0031-3203(96)00142-2
21 Erickson, B. J., & Kitamura, F. (2021). Magician’s Corner: 9. Performance Metrics for Machine Learning Models. Radiology: Artificial Intelligence, 3(3), e200126. https://doi.org/10.1148/ryai.2021200126
22 Ivković, J., & Jelena Lužija Ivković. (2017). Analysis of the Performance of the New Generation of 32-bit Microcontrollers for IoT and Big Data Application. 2, 4(1), 330–336.
23 Goswami, S. (2021). Arduino-Based Milk Quality Monitoring System. International Journal of Agriculture Environment and Biotechnology, 14(2). https://doi.org/10.30954/0974-1712.02.2021.19
24 Kokoulin, A. N., Tur, A. I., Yuzhakov, A. A., & Knyazev, A. I. (2019). Hierarchical Convolutional Neural Network Architecture in Distributed Facial Recognition System. https://doi.org/10.1109/eiconrus.2019.8656727
25 Permana, A. N., Wibawa, I. M. S., & Putra, I. K. (2021). DS18B20 sensor calibration compared with fluke hart scientific standard sensor. International Journal of Physics & Mathematics, 4(1), 1–7. https://doi.org/10.31295/ijpm.v4n1.1225
26 Wang, J., Sakai, K., & Toshihiko Kiwa. (2023). All-in-One terahertz taste sensor: integrated electronic and bioelectronic tongues. Sensors & Diagnostics. https://doi.org/10.1039/d3sd00038a
27 Natnaree Phukkaphan, Tanthip Eamsa-ard, Chalisa Chairanit, & Teerakiat Kerdcharoen. (2021). The Application of Gas Sensor Array based Electronic Nose for Milk Spoilage Detection. https://doi.org/10.1109/iceast52143.2021.9426263
28 Gowri, A., Rajamani, A. S., Ramakrishna, B., & Sai, V. V. R. (2019). U-bent plastic optical fiber probes as refractive index-based fat sensor for milk quality monitoring. Optical Fiber Technology, 47, 15–20. https://doi.org/10.1016/j.yofte.2018.11.019
29 Tiara Oktavia Hardiana, Rinda Nur Hidayati, Wahyu Anggoro, H. Agus Muhamad, & Ninik Irawati. (2019). Detection of water turbidity using LDR sensor. https://doi.org/10.1117/12.2504923
30 Ziyaina, M., Rasco, B., Coffey, T., Ünlü, G., & Sablani, S. S. (2019). Colorimetric detection of volatile organic compounds for shelf-life monitoring of milk. Food Control, 100, 220–226. https://doi.org/10.1016/j.foodcont.2019.01.018
31 Lubis, Z. 2019. Optimasi Nilai K pada Algoritma K-NN dalam Clustering Menggunakan Algoritma Expectation Maximization. (Doctoral dissertation, Universitas Sumatera Utara)

Refbacks

  • There are currently no refbacks.