## 3 Results  
After collecting thermograms of the under surface skin temperatures of diseased animals, we did a plot of under surface skin temperatures relative to average single milk yields to understand if there is a dependence between udder surface skin temperature and milk yield. Figure 2 shows a graph showing the change in average single milk yields with increasing temperature, as well as the type of mastitis. Each pair of columns is a change in the milk yields of one animal in a healthy and diseased state. Figure 3 shows the change in milk yield of healthy animals during the month in order to assess the movement along the lactation curve. Each pair of columns is a change in the performance of one animal. The results presented in the graphs (Figures 2 and 3) were compiled on the basis of average single milk yields and average temperatures of animals in the amount of 24 animals in two groups based on the results of 4 control milkings. Figure 3: Comparison of average one-time milk yields of animal analogues in a healthy condition. Figure 2: Changes in milk yield in case of mastitisti. We build a Linear Regression model for the entire dataset, including healthy and sick animals, to assess whether there was a dependence between under surface skin temperature and milk yield (Figure 4). The resulting model showed us the presence of a dependence, but with low accuracy (Coefficient of determination = 0.591), so we decided to take a closer look at the data and differences between the studied groups of animals. We built separate models for healthy animals and animals with mastitis to assess whether there is a dependence within the groups (Figure 5). The result showed almost complete absence of dependence for healthy animals (R\({}^{2}\) = 0.029) and very high dependence for diseased animals (R\({}^{2}\) = 0.886), which became clear evidence for the hypothesis of a linear dependence between udder surface skin temperature and milk yield for animals with subclinical and clinical mastitis. We used these results as a separation criterion for the algorithm for assessing the state of the herd. On this basis, we decided to develop an algorithm that predicts the presence of a disease and changes in milk yield in diseased animals. We considered the possibility of building separate linear models for subclinical and clinical mastitis, but faced the problem of a small number of animals with clinical form of mastitis, and the high accuracy of the general model for mastitis animals excludes a strong deviation for the group with clinical mastitis. Figure 4: Linear regression model for all data obtained, coefficient of determination: 0.5914, intercept: 50.526, slope: \([-1.17543961]\). Figure 5: Linear regression model for healthy (**a**) and mastitis (**b**) animals. To additionally determine the dependence between under surface temperature and milk yield, a linear Pearson correlation coefficient was calculated. For healthy animals, [PERSON]'s linear correlation coefficient showed a value of 0.16, which confirms the weak dependence of milk yield and milk flow rate on udder temperature in the range [32-35.9 \({}^{\circ}\)C]; however, for sick animals in the range [36-39 \({}^{\circ}\)C], the coefficient showed a value of \(-0.96\), confirming the extremely high correlation between the critical rise in udder surface temperature and milk yield. Therefore, we can state that changes in milk yield at temperatures from 32 to 35.9 \({}^{\circ}\)C are a particular feature of animals, and not a regularity. At the same time, when udder skin surface temperature reaches 36 \({}^{\circ}\)C, milk yields begin to decrease as temperature increases. It should be noted that an assumption is applied here, since it is impossible to determine the temperature without contact with the device used with ideal accuracy, and the error of the device is 0.4 \({}^{\circ}\)C; therefore, it is the temperatures obtained by the device that are indicated as the reduced range.