Exploratory data inference for detecting mastitis in dairy cattle

The aim of this study was to employ the principal component technique to physiological data and environmental thermohygrometric variables correlated with detection of clinical and subclinical mastitis in dairy cattle. A total of 24 lactating Girolando cows with different clinical conditions were selected (healthy, and with clinical or subclinical mastitis). The following physiological variables were recorded: udder surface temperature, ST (°C); eyeball temperature, ET (°C); rectum temperature, RT (°C); respiratory frequency, RF (mov. min). Thermohygrometric variables included air temperature, AirT (°C), and relative humidity, RU (%). ST was determined by means of thermal images, with four images per animal, on these quarters: front left side (FL), front right side (FR), rear right side (RR) and rear left side (RL), totaling 96 images. Exploratory data analysis was run through multivariate statistical technique with the employment of principal components, comprehending nine variables: ST on the FL, FR, RL and RR quarters; ET, RT; RF, AirT and RU. The representative quarters of the animals with clinical and subclinical mastitis showed udder temperatures 8.55 and 2.46° C higher than those of healthy animals, respectively. The ETs of the animals with subclinical and clinical mastitis were, respectively, 7.9 and 8.0% higher than those of healthy animals. Rectum temperatures were 2.9% (subclinical mastitis) and 5.5% (clinical mastitis) higher compared to those of healthy animals. Respiratory frequencies were 40.3% (subclinical mastitis) and 61.6% (clinical mastitis) higher compared to those of healthy animals. The first component explained 91% of the total variance for the variables analyzed. The principal component technique allowed verifying the variables correlated with the animals' clinical condition and the degree of dependence between the study variables.


Introduction
Dairy husbandry is a relevant activity in Brazilian agribusiness and responsible for the availability of a product high in nutritional value for the population. However, its productive efficiency has mastitis incidence in dairy cattle as main hindrance, causing economic damages and decreasing the quality of the final product. Mastitis is a multi-etiological disease characterized by an inflammatory process of the mammary glands, as a result of a bacterial infection that presents itself in subclinical and clinical forms (Langoni et al., 2017;Vliegher, Fox, Piepers, McDougall, & Barkema, 2012).
The application of this technique, with an emphasis on detecting early inflammatory cases, has been reported in some studies, such as Polat et al. (2010), Pezeshki et al. (2011) and Digiovani et al. (2016), which investigated thermal images as a diagnosis tool for detecting subclinical mastitis and verified that thermography allowed identifying temperature changes on the animals' udder skin surface. Gloster, Ebert, Gubbins, Bashiruddin, and Paton (2011) and Redaelli et al. (2014) proposed analyzing thermal images as a preventive method, since it detects temperature changes before the onset of the first clinical signs, acting as a warning sign for animal observation.
Collecting physical data on the environment and physiological data on animals may assist in decision-making processes and diagnoses, using multivariate analysis with the principal component technique. The principal component technique in animal researches has been applied to assess production characteristics concerning laying birds (Paiva, Teixeira, & Yamaki, 2010).
In this context, the objective of this study was to employ the principal component analysis to physiological and environmental thermohygrometric data correlated with detection of subclinical and clinical mastitis in dairy cows.

Material and methods
The research was conducted in a milk production unit, at Fazenda Roçadinho, located in the municipality of Capoeiras, Agreste Mesoregion, Microregion of Vale do Ipojuca, state of Pernambuco (8º 36' 33" S latitude, 36º 37' 30" W longitude, and 733 m altitude).
The animals selected were Girolando cows with the same birth order, lactation stage, weight, body score, production, breed group, all monitored for sourcing of udder thermal images. The amount of samples was determined according to selection criteria and totaled 24 animals -eight healthy animals, eight with subclinical mastitis and eight with clinical mastitis, totaling 96 quarters analyzed.
Most of the animals with subclinical mastitis had their front left quarter infected, and those with clinical mastitis had all quarters infected (FL, FR, RL and RR). This condition was established using the California Mastitis Test (CMT), before the first milking of the day, disregarding the first milk gushes because, on this milking shift, milk fat content is low and does not interfere with the CMT score visual results. The test was run for each mammary quarter. Scores were given, rangin g from 0 to 5: score 0there was no precipitate formation (healthy); score 1, there was light precipitate (sign of infection); score 2 -moderate precipitate; score 3 -clear precipitate, but without gel formation; score 4 -clear gel formation; and score 5 -heavy gel formation.
To limit subjective biases in interpretation of results, only scores 2 to 5 were considered for selection of animals with subclinical mastitis. For detection of clinical mastitis cases, the "dark-bottomed mug" test was applied. This test allowed detecting visible changes in milk. In addition, it was possible to verify that the animals were sensitive to touch on their udders and teats due to the presence of an inflammatory condition.
The thermal images were obtained from an infrared thermographic camera, with resolution of 0.01º C, focal length of 1.0 m, and emissivity adjusted to 0.97 (Digiovani et al., 2016). The images were taken in the morning, before the first milking, between 05:00 and 07:00 (because it is when room temperature is lower and does not interfere with the image analysis process) on the following quarters: front left side (FL), front right side (FR), rear left side (RL) and rear right side (RR), with four images per animal, totaling 96 thermal images for analysis of mammary quarters ( Figure 1). The thermal images were analyzed with the aid of software Flir QuickReport®; emissivity, room temperature and relative humidity values, obtained while the images were being taken, were adjusted.
Thermohygrometric variables were registered in the milking parlor: air temperature (AirT, °C) and relative humidity (RU, %); they were obtained concomitantly with the thermal images, by means of dataloggers, HOBO U12-12 model, with the AirT scale being -20 to 70 °C, and the RU scale, from 5 to 95% (Onset Computer Corporation Bourne, MA, USA).
Physiological responses -rectum temperature (RT, °C), respiratory frequency (RF, mov. min-1) and eyeball temperature (ET, °C) -were collected during the monitoring of the animals while the images were being taken. All animals were subjected to these determinations. RF was determined by the count of the number of movements in the animals' flank area, within a 1-min interval (Stewart, Schaefer, Huddart and Sutherland, 2017). After RF was recorded, RT measures were taken with the aid of digital thermometer for veterinary purposes, scaled between 20 and 50°C, which was inserted into the animals' rectum until its stabilization. A thermal imager was used for registering ET, in accordance with the same criterion adopted to take thermal images of the animals' udder.
Exploratory data analysis was performed by means of multivariate statistical technique, through principal component procedure, comprehending nine variables: udder surface temperature (ST, °C) on the FL, FR, RL and RR quarters, ET, RT, RF, RU and AirT.
For the study of temperature variations on each quarter of the animals' udder, the characterization of the production environment and physiological variables (AirT, RU, RF, RT and ET) were taken into account, with the employment of a technique for checking association of variables, by observing the angle and magnitude of vectors in order to infer on the influence of the variables and on the correlation between them as to udder surface temperature.
The principal component analysis technique consisted of transforming the original set of variables into a new set with equivalent dimensions, named principal components. The premise of this procedure is that the first principal components would contain the greatest variability of the original data. However, the other components can be rationally discarded, reducing the number of variables.
The criterion used for discarding variables was recommended by Jolliffe (1973); the number of discarded variables must be equal to the number of components whose variance (eigenvalue) is lower than 0.7. To discard variables, the one with the highest coefficient (absolute value) in the principal component of lowest eigenvalue (lowest variance) must be the least important in explaining total variance and, therefore, can be discarded.
From Pearson's correlation coefficient, with variation between -1 and 1, the direction (positive or negative) and the strength of the correlation between variables were considered. All analyses were run on programs MINITAB (2017), version 18.1, and Origin 8.6 (2011).

Results and discussion
Environmental variables, the animals' physiological responses and udder surface temperature, obtained from the analysis of thermal images of the quarters, are displayed in Table 1.
The temperatures were taken on Flir Quickreport application. It allows uploading images and selecting areas for analysis. For these analyses, one area for each mammary quarter was considered. Temperature differences were found between healthy quarters and quarters with clinical mastitis, estimated at 8.55°C (Table 1). Comparing healthy quarters with quarters classified as having subclinical mastitis, there was a rise in temperature of 2.46°C (Table 1). Studies such as that by Polat et al. (2010) presented, as results, quarters with subclinical mastitis whose surface temperature was 2.35 °C higher than that of healthy quarters.
The eyeball temperatures of the animals with subclinical and clinical mastitis were 7.9% and 8.0% higher, respectively, compared to those of healthy animals. Studies such as that by Kessel, Johnson, Arvidsson, and Larsen (2010) found linear correlation between the eyeball temperature and body temperature of animals. The eyeball temperature stabilized between 36.5 and 37.0°C, despite continuous increase in body temperature. Johnson, Rao, Hussey, Morley, and Traub-Dargatz (2011) used thermography as a screening tool for febrile ponies and found sensitivity of 91.5% and specificity of 92.3% after multiple temperature readings of the eyes. Rectum temperatures were 2.9% (subclinical mastitis) and 5.5% (clinical mastitis) higher compared to those of healthy animals. Respiratory frequencies presented an increase of 40.29% (subclinical mastitis) and 61.63% (clinical mastitis) over those of healthy animals (Table 1). Johnson et al. (2011) found a mean value of 39.8 for rectum temperature and verified its correlation with the ponies' higher body temperature (fever case). Based on the results obtained through the principal component technique, the eigenvalues and variance percentages relating to the health animals and to those with clinical or subclinical mastitis are displayed in Table 2. The first two components (CP1 and CP2) explained 90.6% of the total variance for the analyzed variables. These components refer to udder surface temperature on the rear left and rear right quarters.
Seven variables presented higher coefficients, in absolute values, as of the last principal component, and can be discarded. The reason for it is that variables highly correlated with principal components of lower variances represent a virtually insignificant variation. The variables that can be discarded, in decreasing order of importance to explain total variance, are RT, RU, RF, FR, FL and AirT, respectively. In this context, main components 1 and 2 were presented for showing values above 0.7, according to Jolliffe (1973) criterion. Figure 2 shows that healthy animals directly correlated with relative humidity. Those with subclinical mastitis directly correlated with eyeball temperature, respiratory frequency, rectum temperature and air temperature. The animals with clinical mastitis, in their turn, directly correlated with udder temperature on the RL, RR, FL and FR quarters.
The correlation between variables by Pearson's coefficient (Table 3) proved to be strong between mammary quarters (0.89; 0.84; 0.91; 0.75; 0.8 and 0.86). According to Figueiredo Filho and Silva Júnior (2009), the closer to 1 the coefficient value (regardless of sign), the higher the degree of statistical dependence between variables. On the other hand, the closer to zero, the weaker the strength of this correlation.
Eyeball temperature presented moderate correlation for all quarters. Concerning rectum temperature, strong correlation was found for all quarters (0.87; 0.88; 0.81; 0.87), and the same goes for eyeball temperature (0.8). Respiratory frequency showed strong correlations for all quarters (0.76; 0.8; 0.7 and 0.81), and so did eyeball temperature and rectum temperature (0.85 and 0.93). Air temperature presented strong correlations with the RF, RT, ET, RL and RR variables (0.85; 0.85; 0.74; 0.75 and 0.7), and moderate with FR (0.62). Relative humidity showed negative correlation for all variables (Table 3).

Conclusion
The quarters of the animals with clinical and subclinical mastitis presented udder surface temperatures 8.55 and 2.46°C higher than those of healthy animals, evidencing that animals with mastitis have their udder surface temperature affected by the disease.
The principal component technique allowed verifying variables correlated with the animals' clinical condition and the degree of dependence between variables, helping diagnose the disease.