Cow Milk Quality Grading using Machine Learning Methods


Shubhangi Neware


Milk is considered as complete food as it contains rich set of proteins and vitamins. Therefore determining quality of cow milk plays an important role in today’s research. In this paper four methods are implemented to check quality of cow milk using dataset consists of 1059 milk samples taken from various cows. Three grades of milk grade A, B, C are considered based on different features of cow milk. Various machine learning methods K Nearest neighbors, Logistic regression, Support Vector machine and ANN are implemented. Accuracy of these methods is then compared. It has been observed that the results of KNN (n=3) is more accurate amongst all four methods implemented in the proposed research work.


How to Cite
Shubhangi Neware. (2023). Cow Milk Quality Grading using Machine Learning Methods. International Journal of Next-Generation Computing, 14(1).


  1. Ahmad, I., Komolavanij, S., and Chanvarasuth, P. 2010. Prediction of raw milk microbial quality using data mining techniques. Agricultural Information Research 19, 3, 64–70. DOI:
  2. Das, D., Goje, N., Uparkar, S., Upadhye, S., and Upasani, M. 2021. Performance analysis of support vector machine algorithms. International Journal of Next-Generation Computing 12, 5.
  3. Deshpande, A., Deshpande, S., and Dhande, S. 2021. Nir spectroscopy based milk classification and purity prediction. In 2021 IEEE Pune Section International Conference (PuneCon). IEEE, 1–5. DOI:
  4. Frizzarin, M., Gormley, I., Berry, D., Murphy, T., Casa, A., Lynch, A., and 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. DOI:
  5. McDermott, A., Visentin, G., McParland, S., Berry, D., Fenelon, M., and De Marchi, M. 2016. Effectiveness of mid-infrared spectroscopy to predict the color of bovine milk and the relationship between milk color and traditional milk quality traits. Journal of Dairy Science 99, 5, 3267–3273. DOI:
  6. Neware, S. 2020. Fruit grading system using k means clustering and artificial neural network. International Journal of Advanced Trends in Computer Science and Engineering 9, 1. DOI:
  7. Neware, S., Mehta, K., and Zadgaonkar, A. 2013. Finger knuckle identification using principal component analysis and nearest mean classifier. International Journal of Computer Applications 70, 9. DOI:
  8. Radhakrishnan D., N. S. 2019. An experimental analysis of various algorithms for classification in educational data mining with the help of lms. International Journal of Innovative Technology and Exploring Engineering Vol.8, No.3, pp.271–276.
  9. Sarker, I. H. 2021. Machine learning: Algorithms, real-world applications and research directions. SN Computer Science 2, 3, 1–21. DOI:
  10. Suhendra, D., Rahman, M. A., and Megawati, M. 2020. Correlation of protein contents and milk temperatures, with milk density of friesian holstein (fh) cow in ngablak district of magelang regency central java. Journal of Livestock Science and Production 4, 2, 289–294. DOI:
  11. Teichert, J., Cais-Sokolinska, D. ´ , Dankow, R. ´ , Pikul, J., Chudy, S., Bierzunska, P. ´ , and Kaczynski, L. K. ´ 2020. Color stability of fermented mare’s milk and a fermented beverage from cow’s milk adapted to mare’s milk composition. Foods 9, 2, 217. DOI: