Analysis of Different Sensor Data Using Machine Learning Methods for the Purpose of Determining Milk Quality - Sinan Sevinç; Yavuz Selim Taşpınar (Indonesian Journal Publisher, 2026)
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.