Discrete Homogeneous and Non-Homogeneous Markov Chains Enhance Predictive Modelling for Dairy Cow Diseases

Simple Summary Managing cow diseases effectively remains a major challenge in dairy farming. Our study introduces a simple model for predicting dairy cow diseases. To develop this model, we used categorized data and Markov chains to select the best prediction model based on minimal error distance. The results show that our model is not only highly accurate and reliable but also easy to use, even in low-tech farms. Our methodological approach can capture various data structures in different volumes and qualities, demonstrating its versatility and adaptability to a wide range of herd sizes. This universal applicability enables us to evaluate entire herds, regardless of size. Furthermore, while each farm records diseases differently, our model can accommodate these variations. As such, this model may help dairy farmers manage herd health, predict antibiotic costs, and plan farming strategies. Abstract Modelling and predicting dairy cow diseases empowers farmers with valuable information for herd health management, thereby decreasing costs and increasing profits. For this purpose, predictive models were developed based on machine learning algorithms. However, machine-learning based approaches require the development of a specific model for each disease, and their consistency is limited by low farm data availability. To overcome this lack of complete and accurate data, we developed a predictive model based on discrete Homogeneous and Non-homogeneous Markov chains. After aggregating data into categories, we developed a method for defining the adequate number of Markov chain states. Subsequently, we selected the best prediction model through Chebyshev distance minimization. For 14 of 19 diseases, less than 15% maximum differences were measured between the last month of actual and predicted disease data. This model can be easily implemented in low-tech dairy farms to project costs with antibiotics and other treatments. Furthermore, the model’s adaptability allows it to be extended to other disease types or conditions with minimal adjustments. Therefore, including this predictive model for dairy cow diseases in decision support systems may enhance herd health management and streamline the design of evidence-based farming strategies.


Introduction
Dairy farming improves human welfare globally.Directly or indirectly, the dairy sector employs approximately 240 million people and provides a livelihood for up to one billion people worldwide.Furthermore, milk production promotes female empowerment [1], as well as sustainable production and consumption patterns [2] and water and sanitation management [3], in line with sustainable development goals (SDGs) 10, 12 and 6, respectively.In turn, increasing dairy intake reduces healthcare costs [4] and inequalities in food security and nutrition [5].The need for sustainable livestock production in response to challenges is using a farm animal algorithm in order to address the population increase and avoid food problems in the future [6].
Milk production and reproduction are influenced by a multitude of factors that complement each other [7,8] and can be useful in diagnosing various problems and diseases.In dairy cattle, a wide range of diseases occur, from reproductive tract issues to problems with the mammary gland [9,10] and limbs [11], and even metabolic diseases [12] affecting the general resilience of dairy cows [13].Most of these diseases have significant economic implications due to reduced milk yield and, for example, the necessity for early culling of dairy cows.Dairy cow diseases considerably decrease farm productivity [14].In addition to adversely affecting animal welfare by causing pain and discomfort [15], dairy cow diseases such as digital dermatitis decrease milk yield [16] and lead to fertility problems [17].Making matters worse, diseases like mastitis can affect milk quality and safety, posing risks to human health [18].Due to increased veterinary costs and loss of livestock, these diseases financially strain dairy farms, which incur high economic losses [19].Minimizing such economic losses may require a one-health approach to dairy production [20], including research on disease prevention and modelling.
Modelling and predicting dairy cow diseases using precision livestock farming approaches [21] and/or enhancing cattle production and management through convolutional neural networks [22] provides dairy farmers with valuable information for effective herd health management through strategies specifically designed to tackle each disease individually [23,24].Projecting disease occurrences enables dairy farmers to improve animal health [25].As a result, dairy farmers not only observe a positive impact on animal health [26] but also increase their profitability [27], primarily by decreasing costs with antibiotics [28].
Predictive models for dairy cow diseases were developed based on several research directions.Dairy diseases can be detected with wearable precision dairy technologies [29,30] and processed at the disease with machine learning [31].In practice, machine learning algorithms were applied to project lameness [32] and combined with sensor data to predict mastitis [33].However, machine learning-based approaches require developing a specific model for each disease.Conversely, other models can predict diseases at the herd level by regularly collecting herd summary data and applying parametric and nonparametric approaches to forecast herd health conditions, but not at the disease level [34].Therefore, developing a model for simultaneously predicting several diseases may demand alternative approaches, such as Markov chains.
Markov chains have already been applied for cow behavior analysis and calving time prediction [35].A Markov chain model with two states, shedding and non-shedding, was developed to analyze Listeria monocytogenes fecal shedding in dairy cattle [36].Furthermore, Hidden Markov models were used to project healthy or diseased states based on monthly somatic cell scores of dairy cows with or without clinical mastitis [37] and to detect lameness in image records of cow movements [38].However, as in the machine learning studies described above, low data availability limits the consistency of these models [39].Nevertheless, a Markov chain model was integrated with a daily dynamic programming model to assess the effect of reproductive performance on dairy cattle herd value [40].
The present study aims at leveraging Markov chains to effectively model and predict the progression and occurrence of dairy cow diseases during lactation towards improving decision-making [41][42][43], and farm management about herd health and cutting costs [44].

Data Description
A dataset of 36 diseases was collected for 750 dairy cows of a herd housed in a farm located in the Czech Republic during the six-year period from 1 January 2018 to 7 December 2023, totaling 2167 days.This dataset contained the count of occurrences of each dairy cow disease monitored daily during the study period.
The data were continuously collected by the dairy farm's zootechnician and subsequently processed using Python scripts.During the data pre-processing stage, it was essential to carry out extensive data cleaning, including the standardization of data formats and the removal of duplicate entries.These steps were critical to ensure the reliability and consistency of the dataset used in our analysis.
Table 1 presents a statistical summary of these disease data.The data outlined in Table 1 highlight the low occurrence of most diseases in this dairy farm.

Statistical Methods
To assess differences in dairy cow disease occurrences during the study period, we performed the nonparametric Kruskal-Wallis test using time series data for each disease.Based on the results from this test, we identified significant quarterly differences in variables for each disease (the significance level for this study is set to 5%).

Criteria for Model Selection
Initially, we analyzed the data to identify frequent diseases.For such diseases, we applied the Markov Chain model; otherwise, we used the Elementary probability model.
The marker O1(i, q) is equal to zero when disease i does not occur in quarter q; otherwise, the marker is equal to one.The marker O1(i, q) is calculated according to the following formula: where d(i, t) is the number of occurrences of dairy disease i on day t, the set Q q consists of all days in quarter q.
The marker O2(i) expresses the number of days disease i occurs throughout the monitoring period.This marker is calculated according to the following formula: where d(i, t) is the number of occurrences of dairy disease i on day t and N represents the set of all monitoring days.The decision to use the Elementary probability model or the Markov Chain model is made based on the relative number of quarters i and on the relative number of days i during which the disease occurs.Two indexes are calculated F1(i) and F2(i) as follows: where Q is number of monitored quarters.
where N is total number of monitored days.
The following rule for model selection is applied: 5 and F2(i) > 0.01, then the Markov Chain model is used; otherwise (i f F1(i) ≤ 0.5 or F2(i) ≤ 0.01), the Elementary Probability model is used. (5)

Description of the Model 2.4.1. Classical Probabilistic Model
The classical probability model is chosen if a rare disease occurrence is assumed based on the Formula (5).Two states are then considered: 0-the disease does not occur, and 1-the disease occurs.The probability p(i, 1) of the occurrence of the disease i is calculated as a relative frequency using the following formula: where d(i, t) is the number of occurrences of dairy disease i on day t, N is the total number of days, and T is the number of the last days used to test the prediction (Figures 1 and 2).

Classical Probabilistic Model
The classical probability model is chosen if a rare disease occurrence is assumed based on the Formula (5).Two states are then considered: 0-the disease does not occur, and 1-the disease occurs.The probability  ,  of the occurrence of the disease  is calculated as a relative frequency using the following formula: where  ,  is the number of occurrences of dairy disease  on day  ,  is the total number of days, and  is the number of the last days used to test the prediction (Figures 1 and 2).Accordingly, the probability  ,  of non-occurrence of disease  is calculated using the following formula: The accuracy of this model is tested by comparing its results with real data using Chebyshev distance, which is particularly suitable for highlighting the maximum deviation between predicted and actual values, thereby providing a clear measure of the model's worst-case error performance.

Discrete Markov Chain Model
A Markov chain is a stochastic process that models the probability of transition from one state to another, where the next state depends only on the current state and not on the sequence of events that preceded it (the "memoryless" property).If the Discrete Markov chain model was selected in the previous phase to predict disease occurrence based on

Classical Probabilistic Model
The classical probability model is chosen if a rare disease occurrence is assumed based on the Formula (5).Two states are then considered: 0-the disease does not occur, and 1-the disease occurs.The probability  ,  of the occurrence of the disease  is calculated as a relative frequency using the following formula: where  ,  is the number of occurrences of dairy disease  on day  ,  is the total number of days, and  is the number of the last days used to test the prediction (Figures 1 and 2).Accordingly, the probability  ,  of non-occurrence of disease  is calculated using the following formula: The accuracy of this model is tested by comparing its results with real data using Chebyshev distance, which is particularly suitable for highlighting the maximum deviation between predicted and actual values, thereby providing a clear measure of the model's worst-case error performance.

Discrete Markov Chain Model
A Markov chain is a stochastic process that models the probability of transition from one state to another, where the next state depends only on the current state and not on the sequence of events that preceded it (the "memoryless" property).If the Discrete Markov chain model was selected in the previous phase to predict disease occurrence based on Accordingly, the probability p(i, 0) of non-occurrence of disease i is calculated using the following formula: The accuracy of this model is tested by comparing its results with real data using Chebyshev distance, which is particularly suitable for highlighting the maximum deviation between predicted and actual values, thereby providing a clear measure of the model's worst-case error performance.

Discrete Markov Chain Model
A Markov chain is a stochastic process that models the probability of transition from one state to another, where the next state depends only on the current state and not on the sequence of events that preceded it (the "memoryless" property).If the Discrete Markov chain model was selected in the previous phase to predict disease occurrence based on Formula (5), discrete Homogeneous (HMC) or Non-homogeneous (NHMC) Markov chain model accuracy is tested using Chebyshev distance.For this purpose, the Markov chain states are defined first, and then either the Transition matrix is calculated for the HMC model or the four Transition matrices are calculated for the NHMC model and each season.After the predictions, the accuracy of the model is calculated using Chebyshev distance to compare the results with real data.
To clarify the differences between the models, a Homogeneous Markov Chain (HMC) assumes that the transition probabilities remain constant over quarters, which simplifies the modeling process when disease occurrence patterns are relatively stable throughout the year.On the other hand, a Non-homogeneous Markov Chain (NHMC) allows transition probabilities to vary over quarters, capturing temporal or seasonal variations in disease dynamics.This flexibility in the NHMC model is crucial for scenarios where disease progression is influenced by seasonal factors, making it a more suitable choice when the data suggest periodic changes in disease occurrence.
Step 1-Definition of the states of the Markov chain model The states of the Markov chain model are defined as the number of dairy cows affected by the disease per day.All states form the set {0, 1, 2, . . . ,M}, where M is the number of dairy cows, 0 means that no dairy cow is affected by the disease per day, and M means that all dairy cows are affected by the disease per day.However, only a smaller number k ≤ M of cows is affected usually.Therefore, the real set of states of disease i is where d(i, t) is the number of occurrences of dairy cow disease i on day t.
If the probability of states referring to the highest number of disease occurrences per day is very low, the following subset S R (i) of the set of states S(i) of the Markov chain model is used: where 0, 1, . .., R are elements of S R (i), R ≤ K, and state R aggregates all other {s R , s R+1 , . . . ,s K } states.
Step 2-Homogenous Markov Chain Assuming the homogeneity of the process during the monitoring period, we first determine the Transition matrices for all possible numbers of states R (Figure 1).For each disease i, the transition probabilities are calculated using the following formula: where p R (i, a, b), a, b = 1, 2, . . ., R, is the probability of the transition from state a sick dairy cows to state b sick dairy cows, N is the count of all days, T is the length of the predicted period, and c ab (i, t) is equal to either 1 if the transition from state a to state b occurs in time t or 0 otherwise.At the end, the transition matrix is calculated for all reasonable R for which ⌊K/2⌋ ≤ R ≤ K because a smaller number of states would not describe the numbers of sick cows well enough.
State probabilities for each disease i = 1, . . ., N are predicted as follows: pT where pT R (i) = ( pR (i, 0), pR (i, 1), . . . ,pR (i, R)) is the predicted distribution of states proba- bilities in predicted period T, p init is vector of initial state probabilities with dimension R with all zeros, except the state describing the last count of occurrences of disease i, where its value is 1, P T R (i) = P R (i)•P R (i)• . . .•P R (i) is the transition matrix from time N − T + 1 to N, i.e., T-th power of matrix P R (i), and T is the length of the predicted period.
The best value R * is selected based on Chebyshev distance minimization to identify the best predictive accuracy: where pT r (i, j) is a j-th element of the vector pT R (i), i.e., predicted probability of state j, and c j (i, t) is equal to either 1 if j dairy cows were sick with disease i in time t or 0 otherwise.
Based on predicted state probabilities the mean value of disease occurrences per day can be calculated as: The mean value of disease occurrences per day, m(i), is calculated as the scalar product of two vectors: the vector of predicted state probabilities pT R (i) and the transposed vector of possible disease occurrence states (0, 1, 2, . . ., R * ) ′ .
Step 3-Non-Homogenous Markov Chain If the quarter data show a non-homogeneous process, all four quarterly transition matrices must be calculated, that is, one for each predicted quarter (Figure 2).
These four transition matrices are then tested using Formulas ( 10)-( 12) regarding the split time span.Markov chain model was implemented, calculated, and tested using Python programming language.

Results
In this study, we used three mathematical models, namely Elementary Probability and discrete HMC and NHMC models, to predict the probability distribution of dairy cow diseases in the next one and two months.Markov chain model was implemented, calculated, and tested using Python programming language.

Results
In this study, we used three mathematical models, namely Elementary Probability and discrete HMC and NHMC models, to predict the probability distribution of dairy cow diseases in the next one and two months.

Rare Diseases
The results of the prediction of disease occurrences in the next month, assuming that F1(i) ≤ 0.5 or F2(i) ≤ 0.01, are presented in Table 2.The predicted probabilities of disease occurrences are computed using the Elementary probability model expressed by Formulas ( 6) and (7).Diseases-names of dairy diseases; Total sum of disease occurrence; p(i, 0)-a predicted probability of nonoccurrence of disease i; p(i, 1)-a predicted probability of an occurrence of disease i.

Prevalent Diseases
The HMC model was first applied to predict the state probabilities in the next one (model HMC30) and two (model HMC60) months.The results of the prediction of disease occurrences in the next months, assuming that F1(i) > 0.5 and F2(i) > 0.01, are presented in Table 3.
For the next month, the mean Chebyshev distance was 0.132, and the median value was 0.104.For the next two months, the predictive performance of the Markov chain model reached a mean Chebyshev distance of 0.189, with a median value of 0.2.The maximum deviations of Chebyshev distance were observed when predicting the occurrence of 'Necrobacillosis' and 'Mastitis LF' using the HMC model.
As shown in Appendix A, the mean value of the first state (healthy herd) across all records was approximately 0.761 for one month and 0.761 for two months.These values highlight the healthy state of the dairy herd.
The NHMC model was then applied to predict the probability distribution for the next one and two months.The NHMC results are presented in Table 4. Transition matrices were calculated separately for each quarter.The mean Chebyshev distance was 0.12, and the median value was 0.088 for one month of prediction.The predictive performance of the NHMC model for the next two months reached a mean Chebyshev distance of 0.101, with a median value of 0.074.As shown in Appendix A, the mean value of the first state was approximately 0.731 for the next month and 0.732 for the next two months, across all records.These results demonstrate the healthy state of the dairy herd.The results enabled us to compare two approaches, namely the HMC and the NHMC models, to assess their accuracy using Chebyshev distance.For one and two months, the predictive accuracy of the HMC model was 0.132 and 0.189, respectively.In turn, for the same intervals, the predictive accuracy of the NHMC model was 0.144 and 0.101, respectively.Thus, HMC is more accurate than NHMC.For all diseases, the mean probability of the non-occurrence of the disease was higher than 79%.

Analysis of the Results
In this section, we analyze the results from the predictive model for diseases Metabolic problems, Mastitis RB and Reproduction problems, respectively.

Metabolic Problems
The mean value of the expected number of occurrences per day is 0.482, according to the HMC model.Even the histogram (Figure 4) of the probability of the number of metabolic problems shows that the state of no disease occurs on more than 72% of the days and the result accuracy of the HMC model has 0.05 measured by the Chebyshev distance.The results enabled us to compare two approaches, namely the HMC and the NHMC models, to assess their accuracy using Chebyshev distance.For one and two months, the predictive accuracy of the HMC model was 0.132 and 0.189, respectively.In turn, for the same intervals, the predictive accuracy of the NHMC model was 0.144 and 0.101, respectively.Thus, HMC is more accurate than NHMC.For all diseases, the mean probability of the non-occurrence of the disease was higher than 79%.

Analysis of the Results
In this section, we analyze the results from the predictive model for diseases Metabolic problems, Mastitis RB and Reproduction problems, respectively.

Metabolic Problems
The mean value of the expected number of occurrences per day is 0.482, according to the HMC model.Even the histogram (Figure 4) of the probability of the number of metabolic problems shows that the state of no disease occurs on more than 72% of the days and the result accuracy of the HMC model has 0.05 measured by the Chebyshev distance.

Mastitis RB
The expected mean value of Mastitis RB disease occurrences per day is 1.196.According to the histogram (Figure 5) of probabilities of the number of sick dairy cows shown in Figure 5, the state of no disease occurs in less than 52% of the days rounded on decimals.

Mastitis RB
The expected mean value of Mastitis RB disease occurrences per day is 1.196.According to the histogram (Figure 5) of probabilities of the number of sick dairy cows shown in the Error!Reference source not found., the state of no disease occurs in less than 52% of the days rounded on decimals.

Reproduction Problems
The expected number of these diseases was 10.892 per day predicted by the homogenous Markov chain model for the next 30 days with an accuracy of 0.145 measured by Chebyshev distance.According to the histogram shown in Figure 6 of the probabilities of the number of dairy disease occurrences per day, the state of no disease occurs in less than 46% of the days.These results highlight the need to prepare for a relatively high number of 10 sick dairy cows per day.

Reproduction Problems
The expected number of these diseases was 10.892 per day predicted by the homogenous Markov chain model for the next 30 days with an accuracy of 0.145 measured by Chebyshev distance.According to the histogram shown in Figure 6 of the probabilities of the number of dairy disease occurrences per day, the state of no disease occurs in less than 46% of the days.These results highlight the need to prepare for a relatively high number of 10 sick dairy cows per day.

Mastitis RB
The expected mean value of Mastitis RB disease occurrences per day is 1.196.According to the histogram (Figure 5) of probabilities of the number of sick dairy cows shown in the Error!Reference source not found., the state of no disease occurs in less than 52% of the days rounded on decimals.

Reproduction Problems
The expected number of these diseases was 10.892 per day predicted by the homogenous Markov chain model for the next 30 days with an accuracy of 0.145 measured by Chebyshev distance.According to the histogram shown in Figure 6 of the probabilities of the number of dairy disease occurrences per day, the state of no disease occurs in less than 46% of the days.These results highlight the need to prepare for a relatively high number of 10 sick dairy cows per day.

Discussion
To effectively model and predict the progression and occurrence of dairy cow diseases during lactation, we selected Markov chain models because the number of dairy cows with a disease in a forecasted period depends on the number of cows with this disease in the previous period [45].Based on our data analysis and on the accuracy of the results, we further selected HMC rather than NHMC.The HMC model can be used to support the decision-making process in estimating the number of individual diseases, monitoring the development of herd health status and determining the appropriate intensity of veterinary services in dairy farms.
Our HMC model is applicable as a prediction tool for dairy cow diseases in a wide range of dairy farms, regardless of their technological level [46].As a predictive component, this model may also be integrated into a decision support system to improve our ability to predict and manage the health conditions of dairy herds [47], in addition to supporting effective decision-making by predicting potential health outcomes.Leveraging advanced statistical methods for short-term forecasting, this new methodological approach can significantly enhance decision support by capturing various data structures in different volumes and qualities.In addition, this model can be applied to herds of different sizes worldwide to evaluate entire herds from a specific number of animals.Thus, our model enables proactive dairy health management strategies.
During its use, the Markov chain must be updated, which entails updating the values of the matrix of transition probabilities either immediately with each forecast query or after a predetermined period.Because the former approach has the disadvantage of overestimating even instantaneous fluctuations, the latter seems more appropriate.However, this approach requires moving the time window.To this end, the recommended length of forecasts is one-fifth of the length of the time series, but predictions over longer periods are also feasible, up to a quarter.
The accuracy of our HMC and NHMC models in predicting the number of diseases of dairy cows did not significantly differ from that of a similar study using an NHMC model in different time periods [48].However, nonhomogeneous Markov chain prediction [49] using appropriate intervals is a feasible alternative for further research and experiments with disease time series aimed at detecting sub-trends.

Practical Use
Our model may be used as a Markov Chain Decision Process (MCDP) to project individual diseases, thereby assessing veterinarian needs in dairy farms.Based on two different actions, our model enables us to measure differences in two mean values and to increase health state probability.As a prediction tool for dairy cow diseases, this framework is applicable to a wide range of dairy farms, including low-tech farms [46].Unlike precision livestock farming (PLF) applications, which often require substantial investment in technological infrastructure and real-time sensor data, our model provides a statistically robust alternative that remains accessible and effective for farms with limited resources or lower levels of technological advancement.This makes it particularly suitable for low-tech or smaller-scale operations, where the implementation of PLF systems may be cost-prohibitive.As a predictive component, its incorporation into a Dairy Disease Decision Support System (DSS) may enhance dairy herd health prediction and management [47], effectively supporting decision-making by forecasting potential health outcomes and, therefore, enabling proactive management strategies.This novel approach to statistically leverage data to predict short-term trends supports decision-making processes.

Conclusions
Our Markov chain model is a promising tool for predicting the occurrence of dairy cow diseases in the next month.With practical adaptations, this model can be efficiently implemented in dairy farms for farmers to gather useful information for farm health management.One of the key advantages of the Markov chain model is its ability to provide

Figure 1 .
Figure 1.Quarters used across multiple years to calculate a single transition matrix for the HMC, with the final set of quarters in 2023 used for model testing.

Figure 2 .
Figure 2. Grouping of quarters across years used to calculate four quarterly transition matrices for the NHMC, with the final set of quarters in 2023 used for model testing.

Figure 1 .
Figure 1.Quarters used across multiple years to calculate a single transition matrix for the HMC, with the final set of quarters in 2023 used for model testing.

Figure 1 .
Figure 1.Quarters used across multiple years to calculate a single transition matrix for the HMC, with the final set of quarters in 2023 used for model testing.

Figure 2 .
Figure 2. Grouping of quarters across years used to calculate four quarterly transition matrices for the NHMC, with the final set of quarters in 2023 used for model testing.

Figure 2 .
Figure 2. Grouping of quarters across years used to calculate four quarterly transition matrices for the NHMC, with the final set of quarters in 2023 used for model testing.

Figure 3 18 Figure 3 .
Figure 3 shows a flow diagram of the individual steps taken in the process of predicting the number of sick cows in a specific period.Animals 2024, 14, x FOR PEER REVIEW 8 of 18

Figure 3 .
Figure 3. Flow diagram of the calculation of the prediction model for dairy cow diseases.

Figure 4 .
Figure 4. Predicted probability distribution of metabolic problems-homogenous Markov chain model for next 30 days.

Figure 4 .
Figure 4. Predicted probability distribution of metabolic problems-homogenous Markov chain model for next 30 days.

Figure 5 .
Figure 5. Predicted state probability using HMCH of Mastitis RB for next 30 days.

Figure 5 .
Figure 5. Predicted state probability using HMCH of Mastitis RB for next 30 days.

Figure 5 .
Figure 5. Predicted state probability using HMCH of Mastitis RB for next 30 days.

Figure 6 .
Figure 6.Predicted state probability using HMCH of Reproduction problems for next 30 days.

Table 1 .
Basic statistics-summary data of occurrences of dairy cow disease over 5 years.

Table 2 .
Basic probability model for predicting rare diseases that do not meet the selection criteria.

Table 3 .
Basic probability model for predicting prevalent diseases that meet the selection criteria.
Diseases-names of dairy diseases; Min number of states-minimal number of states of Markov chain; Max number of states-maximum number of states of Markov chain; HMC30 Opt.number of states R * -Optimal number of states calculated for Homogenous Markov chain model for next 30 days; HMC30 Opt.number of states Chebyshev distance-Chebyshev distance for an Optimal number of states calculated for Homogenous Markov chain model for next 30 days; HMC30 Mean value of dairy disease occurrences-Mean value calculated for next 30 days of dairy disease occurrence; HMC60 Opt.number of states R * -Optimal number of states calculated for Homogenous Markov chain model for next 60 days; HMC60 Opt.number of states Chebyshev distance-Chebyshev distance for an Optimal number of states calculated for Homogenous Markov chain model for next 60 days; HMC60 Mean value of dairy disease occurrences-Mean value calculated for next 60 days of dairy disease occurrence.

Table 4 .
Results of non-homogenous Markov chains.

Table 4 .
Cont.Min number of states-minimal number of states of Markov chain; Max number of states-maximum number of states of Markov chain; NHMC30 Opt.number of states R * -Optimal number of states calculated for Non-Homogenous Markov chain model for next 30 days; NHMC30 Opt.number of states Chebyshev distance-Chebyshev distance for an Optimal number of states calculated for Non-Homogenous Markov chain model for next 30 days; NHMC30 Mean value of dairy disease occurrences-Mean value calculated for next 30 days of dairy disease occurrence; NHMC60 Opt.number of states R * -Optimal number of states calculated for Non-Homogenous Markov chain model for next 60 days; NHMC60 Opt.number of states Chebyshev distance-Chebyshev distance for an Optimal number of states calculated for Non-Homogenous Markov chain model for next 60 days; NHMC60 Mean value of dairy disease occurrences-Mean value calculated for next 60 days of dairy disease occurrence.
Min number of states-minimal number of states of Markov chain; Max number of states-maximum number of states of Markov chain; NHMC30 Opt.number of states  * -Optimal number of states calculated for Non-Homogenous Markov chain model for next 30 days; NHMC30 Opt.number of states Chebyshev distance-Chebyshev distance for an Optimal number of states calculated for Non-Homogenous Markov chain model for next 30 days; NHMC30 Mean value of dairy disease occurrences-Mean value calculated for next 30 days of dairy disease occurrence; NHMC60 Opt.number of states  * -Optimal number of states calculated for Non-Homogenous Markov chain model for next 60 days; NHMC60 Opt.number of states Chebyshev distance-Chebyshev distance for an Optimal number of states calculated for Non-Homogenous Markov chain model for next 60 days; NHMC60 Mean value of dairy disease occurrences-Mean value calculated for next 60 days of dairy disease occurrence.

Table A1 .
Cont.Diseases-names of dairy diseases; HMC30 Opt.number of states R * -Optimal number of states calculated for Homogenous Markov chain model for next 30 days; HMC 30 Predicted Distribution-predicted probability distribution of optimal states for Homogenous Markov chain model for next 30 days; HMC 60 Opt.number of states R * -Optimal number of states calculated for Homogenous Markov chain model for next 60 days; HMC 60 Predicted Distribution-predicted probability distribution of optimal states for Homogenous Markov chain model for next 60 days; NHMC 30 Opt. number of states R * -Optimal number of states calculated for Non-Homogenous Markov chain model for next 30 days; NHMC 30 Predicted Distribution-predicted probability distribution of optimal states for Non-Homogenous Markov chain model for next 30 days; NHMC 60 Opt.number of states R * -Optimal number of states calculated for Non-Homogenous Markov chain model for next 60 days; NHMC 60 Predicted Distribution-predicted probability distribution of optimal states for Non-Homogenous Markov chain model for next 60 days.