The main objective of this study is to develop an efficient machine learning-based model for the early prediction of clinical mastitis in Holstein Friesian dairy cattle where automatic milking system (AMS) data is used. The model aims to offer a costless opportunity for mastitis control and reduce its negative impact on livestock production. Different forward multilayer perceptron (MLP) neural networks with backpropagation (BP) learning algorithms using various numbers of hidden neurons and epochs have been introduced. The results of the established models are evaluated based on different metrics such as the accuracy, the F1 core, the precision, the recall, and the area under the receiver operating characteristic curve (ROC- AUC). Out of the established twelve models, the optimal neural network consisted of a single hidden layer of 15 hidden neurons, Relu hidden activation function, and a sigmoid activation function at the output layer. After training the model for 100 epochs, it achieved a high classification accuracy of 86%, an F1-score of 78%, precision of 93%, recall of 67%, and an excellent ROC-AUC of 82%. The study demonstrated that the total milk this lactation (TOTM), days in milk (DIM), days open, milk peak (MPEAK), 305-day mature equivalent milk production (305 ME), and daily milk yield (DMY) are important inputs for the model training. The results show that the forward neural network (FNN) with a backpropagation algorithm can offer opportunities to integrate clinical mastitis prediction within a computerized decision support tool. |