Analysis of Different Sensor Data Using Machine Learning Methods for the Purpose of Determining Milk Quality

Authors

DOI:

https://doi.org/10.47134/jtsi.v3i1.5367

Keywords:

milk quality, sensor data, classification, performance analysis, machine learning

Abstract

Milk is a product with high nutritional value, but its quality may vary depending on factors from production to consumption. Milk is a food that can spoil over time and carries a disease risk due to microorganism growth. Therefore, continuous monitoring of milk quality is important. Quality loss can cause changes in milk components such as protein, fat, and lactose. In recent years, sensors have been used to evaluate milk quality by quickly measuring parameters such as chemical components, pH value, temperature, and fat content. These sensor data provide information not only about milk quality but also about the productivity and health of cows. This enables more efficient production processes and early detection of potential diseases. Sensor measurements help determine both milk quality and cow care needs. In this study, quality classification was performed using data from 1059 different milk samples. The dataset consists of 7 features and 1 class feature, and milk quality was classified into three classes: “high”, “medium”, and “low”. kNN (k-Nearest Neighbor), ANN (Artificial Neural Network), DT (Decision Tree), and RF (Random Forest) methods were used for classification. Model performance was evaluated using confusion matrix, accuracy, precision, recall, and F1 score, and detailed analysis was performed using the ROC curve. The kNN model achieved 99.8% accuracy, the ANN model 99.9%, the DT model 99.4%, and the RF model 100%. The RF model showed the highest success. Overall, the classification performances of all models were close to each other, and all can be used to determine milk quality.

References

Alipio, M., & Bures, M. (2024). Current testing and performance evaluation methodologies of LoRa and LoRaWAN in IoT applications: Classification, issues, and future directives. Internet of things, 25, 101053.

Chauhan, Y. J. (2020). Cardiovascular disease prediction using classification algorithms of machine learning. International Journal of Science and Research, 9(5), 194-200.

Civalek, Ö. (1998). Nöro-Fuzzy Tekniği ile Dikdörtgen Plakların Analizi. III. Ulusal Hesaplamalı Mekanik Konferansı, 16-18.

Cui, H., Lin, K., Li, X., Qian, J., & Hu, H. (2024). Road Pothole Detection Model Based on AlexNet Convolutional Neural Network and Confusion Matrix. 2024 IEEE 2nd International Conference on Electrical, Automation and Computer Engineering (ICEACE),

Çelik, A. (2022). Using machine learning algorithms to detect milk quality. Eurasian Journal of Food Science and Technology, 6(2), 76-87.

Çetintav, B., & Yalçın, A. (2025). Explainable Machine Learning Framework for Milk Quality Grading. Kocatepe Veterinary Journal, 18(3), 227-235.

Çınar, M., Engin, M., Engin, E. Z., & Ateşçi, Y. Z. (2009). Early prostate cancer diagnosis by using artificial neural networks and support vector machines. Expert systems with applications, 36(3), 6357-6361.

Dinesh, S., & Dash, T. (2016). Reliable evaluation of neural network for multiclass classification of real-world data. arXiv preprint arXiv:1612.00671.

Eesa, A. S., Orman, Z., & Brifcani, A. M. A. (2015a). A new feature selection model based on ID3 and bees algorithm for intrusion detection system. Turkish Journal of Electrical Engineering and Computer Sciences, 23(2), 615-622.

Eesa, A. S., Orman, Z., & Brifcani, A. M. A. (2015b). A novel feature-selection approach based on the cuttlefish optimization algorithm for intrusion detection systems. Expert systems with applications, 42(5), 2670-2679.

Farabi, S. F., Prabha, M., Alam, M., Hossan, M. Z., Arif, M., Islam, M. R., & Biswas, M. (2024). Enhancing credit card fraud detection: A comprehensive study of machine learning algorithms and performance evaluation. Journal of Business and Management Studies, 6(3), 252-259.

Ferdowsy, F., Rahi, K. S. A., Jabiullah, M. I., & Habib, M. T. (2021). A machine learning approach for obesity risk prediction. Current Research in Behavioral Sciences, 2, 100053.

Ji, B., Banhazi, T., Phillips, C. J., Wang, C., & Li, B. (2022). A machine learning framework to predict the next month's daily milk yield, milk composition and milking frequency for cows in a robotic dairy farm. biosystems engineering, 216, 186-197.

Josephine, P. K., Prakash, V., & Divya, K. (2021). Supervised learning algorithms: A comparison. Kristu Jayanti Journal of Computational Sciences (KJCS), 01-12.

KELEŞOĞLU, Ö., EKİNCİ, C. E., & FIRAT, A. (2005). The using of artificial neural networks in insulation computations. Sigma, 3, 58-66.

Kumar, N., Patil, A., Reddy, D. R., RU, K., & Basavaraj, P. (2024). Predictive Analytics for Milk Quality Using Random Forest (RF) Algorithm. 2024 8th International Conference on Computational System and Information Technology for Sustainable Solutions (CSITSS),

Kumar, R. R., Mudepalli, S., Sathish, N., Upender, T., & Mohmmad, S. (2024). An optimized neural network model to predict milk quality. 2024 14th International Conference on Cloud Computing, Data Science & Engineering (Confluence),

Kumari, S., Gourisaria, M. K., Das, H., & Banik, D. (2023). Deep learning based approach for milk quality prediction. 2023 11th International conference on emerging trends in engineering & technology-signal and information processing (ICETET-SIP),

Lakshmi, S. V., Meena, M., & Kiruthika, N. (2019). Diagnosis of chronic kidney disease using random forest algorithms. International Journal of Research in Engineering, Science and Management, 2(3), 559-562.

Lorenz, A., Blum, M., Ermert, H., & Senge, T. (1997). Comparison of different neuro-fuzzy classification systems for the detection of prostate cancer in ultrasonic images. 1997 IEEE ultrasonics symposium proceedings. an international symposium (Cat. No. 97CH36118),

Love, P. E. (2024). A pragmatist research agenda for employing psychological heuristics in construction: Context, design, artificial intelligence, and performance evaluation. IEEE Transactions on Engineering Management, 71, 11183-11197.

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.

Neamț, R., Ilie, D. E., Gavojdian, D., Acatincăi, S., Neciu, F., & Cziszter, L. (2016). Influence of electrical conductivity, days in milk and parity on milk production and chemical composition. Scientific Papers Animal Science and Biotechnologies, 49(2), 128-128.

Özbay, Y. (1999). EKG aritmilerini hızlı tanıma Doktora Tezi].

Ronco, A. L., & Fernandez, R. (1999). Improving ultrasonographic diagnosis of prostate cancer with neural networks. Ultrasound in medicine & biology, 25(5), 729-733.

Shrijayan. Milk Quality Prediction by Classification. https://www.kaggle.com/datasets/cpluzshrijayan/milkquality

Sokolova, M., & Lapalme, G. (2009). A systematic analysis of performance measures for classification tasks. Information processing & management, 45(4), 427-437.

Sunithamani, S., Muralidhar, D., Anne, G., & Sruthi, C. N. (2024). Milk quality prediction using Machine Learning integrated with Arduino. 2024 10th International Conference on Communication and Signal Processing (ICCSP),

Taşpınar, Y. S., Köklü, M., & Altın, M. (2021). Fire detection in images using framework based on image processing, motion detection and convolutional neural network. International Journal of Intelligent Systems and Applications in Engineering.

Taşpınar, Y. S., & Selek, M. (2020). Object recognition with hybrid deep learning methods and testing on embedded systems. International Journal of Intelligent Systems and Applications in Engineering.

Tian, X., Chong, Y., Huang, Y., Guo, P., Li, M., Zhang, W., Du, Z., Li, X., & Hao, Y. (2019). Using machine learning algorithms to predict hepatitis B surface antigen seroclearance. Computational and mathematical methods in medicine, 2019(1), 6915850.

VijiyaKumar, K., Lavanya, B., Nirmala, I., & Caroline, S. S. (2019). Random forest algorithm for the prediction of diabetes. 2019 IEEE international conference on system, computation, automation and networking (ICSCAN),

Wang, L. (2019). Research and implementation of machine learning classifier based on KNN. IOP Conference Series: Materials Science and Engineering,

Yogi, K. S., Gowda, D., Sujithra, L., Prasad, K., & Midhun, P. (2024). Scalability and performance evaluation of machine learning techniques in high-volume social media data analysis. 2024 11th international conference on reliability, infocom technologies and optimization (trends and future directions)(ICRITO),

Downloads

Published

2026-01-21

How to Cite

Sevinç, S., & Taşpınar, Y. S. (2026). Analysis of Different Sensor Data Using Machine Learning Methods for the Purpose of Determining Milk Quality. Journal of Technology and System Information, 3(1), 16. https://doi.org/10.47134/jtsi.v3i1.5367

Issue

Section

Articles

Similar Articles

<< < 1 2 3 4 5 

You may also start an advanced similarity search for this article.