Milk Quality Prediction Using Machine Learning




Machine Learning, Milk Quality Prediction, Random Forest, Support Vector Machine, Label Encoding


Milk is the main dietary supply for every individual. High-quality milk shouldn't contain any adulterants. Dairy products are sold everywhere in society. Yet, the local milk vendors use a wide range of adulterants in their products, permanently altering the evaporated. Using milk that has gone bad can have serious health consequences. On October 18 of this year, the Food Safety and Standards Authority of India (FSSAI), the nation's top food safety authority, released the final result of the National Milk Safety and Quality Survey (NMSQS) and declared the milk readily available in India to be "mostly safe." According to an FSSAI survey, 68.4% of the milk in India is tainted. The quality of milk cannot be checked by any equipment or special system. Milk that has not been pasteurized has not been treated to get rid of harmful bacteria. Infected raw milk may contain Salmonella, Campylobacter, Cryptosporidium, E. coli, Listeria, Brucella, and other dangerous pathogens. These microorganisms pose a major risk to your family's health. Manually analyzing the various milk constituents can be very challenging when determining the quality of the milk. Analyzing and discovering with the aid of machine learning can help with this endeavor. Here a machine learning-based milk quality prediction system is developed. The proposed technology has shown 99.99% classification accuracy.


Download data is not yet available.
<br data-mce-bogus="1"> <br data-mce-bogus="1">


Anderson, Melisa, et al. "The microbial content of unexpired pasteurized milk from selected supermarkets in a developing country." Asian Pacific journal of tropical biomedicine 1.3 (2011): Volume 1, Issue 3, 2011, Pages 205-211, ISSN 2221-1691, doi:10.1016/S2221-1691(11)60028-2. DOI:

Dhanashekar R, Akkinepalli S, Nellutla A. “Milk-borne infections. An analysis of their potential effect on the milk industry”. Germs. 2012 Sep 1;2(3):101-9. doi: 10.11599/germs.2012.1020. PMID: 24432270; PMCID: PMC3882853. DOI:

Wenchuan Guo, Xinhua Zhu, Hui Liu, Rong Yue, Shaojin Wang,"Effects of milk concentration and freshness on microwave dielectric properties", Journal of Food Engineering, Volume 99, Issue 3,2010, Pages 344-350,ISSN 0260-8774, doi:10.1016/j.jfoodeng. 2010.03.015. DOI:

J. N. V. R. Swarup Kumar, D. N. V. S. L. S. Indira, K. Srinivas and M. N. Satish Kumar, "Quality Assessment and Grading of Milk using Sensors and Neural Networks," 2022 International Conference on Electronics and Renewable Systems (ICEARS), Tuticorin, India, 2022, pp. 1772-1776, doi: 10.1109/ICEARS53579.2022.9752269 DOI:

L. W. Moharkar and S. Patnaik, "Detection and Quantification of Milk Adulteration by Laser Induced Instumentation," 2019 IEEE 5th International Conference for Convergence in Technology (I2CT), Bombay, India, 2019, pp. 1-5, doi: 10.1109/I2CT45611.2019.9033883.

T. Sheng, S. Shi, Y. Zhu, D. Chen and S. Liu, "Analysis of Protein and Fat in Milk Using Multiwavelength Gradient-Boosted Regression Tree," in IEEE Transactions on Instrumentation and Measurement, vol. 71, pp. 1-10, 2022, Art no. 2507810, doi: 10.1109/TIM.2022.3165298 DOI:

K. Brudzewski a, S. Osowski b, T. Markiewicz b , “Classification of milk by means of an electronic nose and SVM neural network”. Received 30 June 2003, Revised 13 October 2003, Accepted 21 October 2003, Available online 30 December 2003.

L. W. Moharkar and S. Patnaik, "Detection and Quantification of Milk Adulteration by Laser Induced Instumentation," 2019 IEEE 5th International Conference for Convergence in Technology (I2CT), Bombay, India, 2019, pp. 1-5, doi: 10.1109/I2CT45611.2019.9033883. DOI:

A. K. S, H. M. L, S. V. G. V., U. M.S, L. Kannagi and P. S. Bharathi, "A Novel and Effective Ensemble Machine Learning Model for Identifying Healthy and Rotten Fruits," 2023 International Conference on Artificial Intelligence and Knowledge Discovery in Concurrent Engineering (ICECONF), Chennai, India, 2023, pp. 1-7, doi: 10.1109/ICECONF57129.2023.10083721. DOI:

S. G, Reethu, S. S and V. K, "Fruit Freshness Detecting System Using Deep Learning and Raspberry PI," 2022 International Conference on Innovative Computing, Intelligent Communication and Smart Electrical Systems (ICSES), Chennai, India, 2022, pp. 1-7, doi: 10.1109/ICSES55317.2022.9914056. DOI:

R. Zhang et al., "Prediction of Dairy Product Quality Risk Based on Extreme Learning Machine," 2018 2nd International Conference on Data Science and Business Analytics (ICDSBA), Changsha, 2018, pp. 448-456, doi: 10.1109/ICDSBA.2018.00090. DOI:

A. Deshpande, S. Deshpande and S. Dhande, "NIR Spectroscopy Based Milk Classification and Purity Prediction," 2021 IEEE Pune Section International Conference (PuneCon), Pune, India, 2021, pp. 1-5, doi: 10.1109/PuneCon52575.2021.9686473. DOI:

Pires IM, Hussain F, M. Garcia N, Lameski P, Zdravevski E. Homogeneous Data Normalization and Deep Learning: A Case Study in Human Activity Classification. Future Internet. 2020; 12(11):194. DOI:

Kumar, S., Neware, N., Jain, A., Swain, D., Singh, P. (2020). “Automatic Helmet Detection in Real-Time and Surveillance Video”. Advances in Intelligent Systems and Computing, vol 1101. Springer, Singapore. DOI:

Swain, D.; Mehta, U.; Bhatt, A.; Patel, H.; Patel, K.; Mehta, D.; Acharya, B.; Gerogiannis, V.C.; Kanavos, A.; Manika, S. A Robust Chronic Kidney Disease Classifier Using Machine Learning. Electronics 2023, 12, 212. DOI:

Swain, D., Parmar, B., Shah, H., Gandhi, A., Pradhan, M. R., Kaur, H. & Acharya, B. (2022). Cardiovascular Disease Prediction using Various Machine Learning Algorithms. Journal of Computer Science, 18(10), 993-1004. DOI:

Ghosh, H., Tusher, M.A., Rahat, I.S., Khasim, S., Mohanty, S.N. (2023). Water Quality Assessment Through Predictive Machine Learning. In: Intelligent Computing and Networking. IC-ICN 2023. Lecture Notes in Networks and Systems, vol 699. Springer, Singapore. DOI:

Alenezi, F.; Armghan, A.; Mohanty, S.N.; Jhaveri, R.H.; Tiwari, P. Block-Greedy and CNN Based Underwater Image Dehazing for Novel Depth Estimation and Optimal Ambient Light. Water 2021, 13, 3470. DOI:

G. P. Rout and S. N. Mohanty, "A Hybrid Approach for Network Intrusion Detection," 2015 Fifth International Conference on Communication Systems and Network Technologies, Gwalior, India, 2015, pp. 614-617, doi: 10.1109/CSNT.2015.76. DOI:




How to Cite

D. Bhavsar, Y. Jobanputra, N. K. Swain, and D. Swain, “Milk Quality Prediction Using Machine Learning”, EAI Endorsed Trans IoT, vol. 10, Nov. 2023.