Indian Journal of Animal Research

  • Chief EditorK.M.L. Pathak

  • Print ISSN 0367-6722

  • Online ISSN 0976-0555

  • NAAS Rating 6.50

  • SJR 0.263

  • Impact Factor 0.4 (2024)

Frequency :
Monthly (January, February, March, April, May, June, July, August, September, October, November and December)
Indexing Services :
Science Citation Index Expanded, BIOSIS Preview, ISI Citation Index, Biological Abstracts, Scopus, AGRICOLA, Google Scholar, CrossRef, CAB Abstracting Journals, Chemical Abstracts, Indian Science Abstracts, EBSCO Indexing Services, Index Copernicus
Indian Journal of Animal Research, volume 54 issue 1 (january 2020) : 128-130

The use of a rule-based module as a decision support system for dystocia detection in dairy cows

D. Zaborski1,*, W. Grzesiak1, J. Wojcik1
1Department of Ruminants Science,West Pomeranian University of Technology, Szczecin-71270, Poland.
Cite article:- Zaborski D., Grzesiak W., Wojcik J. (2018). The use of a rule-based module as a decision support system for dystocia detection in dairy cows . Indian Journal of Animal Research. 54(1): 128-130. doi: 10.18805/ijar.B-841.
The aim of the present study was to construct a rule-based module (RBM) for dystocia detection in dairy cattle and to verify its predictive performance. A total of 3041 calving records of Polish Holstein-Friesian Black-and-White heifers and cows were used. Three continuous and seven categorical predictors of dystocia were included in the three decision tree models, from which the rules for RBM were extracted. The system was equipped with a user-friendly text interface. The percentage of correctly detected easy, moderate and difficult calvings in heifers on the independent test set was 26.13%, 76.52% and 77.27%, respectively. The overall accuracy was 60.12%. The respective values for cows were: 59.18%, 69.01%, 0% and 62.03%. The predictive performance of the constructed system was satisfactory, except for the difficult category in cows.
B-841Dystocia (difficult calving) belongs to one of the most expensive conditions in dairy cattle. Its incidence (including heavy traction, veterinary intervention or cesarean section) in the Polish population of dairy cows (various breeds) was 3.9% between 2007 and 2008 (Pogorzelska and Nogalski, 2010). Dystocia results in many adverse consequences such as: reduced milk, protein and fat yield, impaired reproduction (delayed estrus, longer days to first service and services per conception), higher mortality rates of cows and calves (Mane and Bhangre, 2015), more frequent occurrence of pulmonary and digestive diseases in calves as well as retained placenta, uterine conditions, mastitis and hypocalcemia in cows (Balasundaram et al., 2011a,b; Ercan et al., 2017; McHugh et al., 2011; Mee, 2008; Zaborski et al., 2014).
        
Expert systems, belonging to the methods of artificial intelligence, are quite widely used in animal breeding. They are intended for on-farm decision support by suggesting solutions resulting from the inference based on the set of facts and rules as well as data on a specific case (situation). An example may be a Lait-Xpert Vaches system (Pellerin et al., 1994) for dairy herd management in terms of milk, protein and fat yield, feeding costs, reproduction, health and housing, or a system designed by Domecq et al., (1991) for the evaluation of reproductive efficiency in a herd and the formulation of a strategy for its improvement. A simpler version of the expert system is a rule-based module (RBM), consisting of an inference engine, a knowledge base and a database, which can also be used as a decision support tool. Taking into consideration the numerous negative consequences of dystocia and the previous quite successful applications of expert systems to different agricultural domains, the aim of the present study was to construct the RBM for dystocia detection in a herd and to verify its effectiveness in predicting the occurrence of difficult calvings.
        
A total of 3041 calving records of Polish Holstein-Friesian Black-and-White heifers (1342 records) and cows (1699 records) obtained from four commercial dairy farms located in the West Pomeranian Province were analyzed. The data were collected in 2002 - 2013. The following predictors of dystocia (factors affecting dystocia) in cows were investigated: SIRE – the rank of the cow’s sire based on the mean calving difficulty of its daughters, AGE – calving age (months), HERD – herd category based on its mean milk production (two categories – lower and higher), SEX – calf sex, CLVS – calving season (autumn-winter and spring-summer), DMY – daily milk yield in the preceding lactation (kg), CLVIN – previous calving interval (days), LN – lactation number, PCLV – previous calving difficulty (three categories), MAST – mastitis occurrence during pregnancy (yes or no). The output variable was a calving difficulty category (easy, moderate, difficult). Only five of the above predictors (SIRE, AGE, HERD, SEX, CLVS) were used for heifers. A detailed description of the dataset is given in Zaborski et al., (2016, 2017).
        
The RBM constructed in the present study consisted of three main components (Fig 1): (1) the knowledge base comprising the set of facts and rules from the domain of difficult calvings, (2) the database containing information on the cases (calvings) for which decisions were made and (3) the inference engine, which applied the rules from the knowledge base to the data for individual cases (calvings) from the database and made a final prediction. Moreover, the RBM system was equipped with a user-friendly text interface to ensure easy communication with the farmer.
 

Fig 1: The architecture of the rule-based module (RBM):IE –inference engine, KB – knowledge base, DB - database.


        
For the RBM construction, the CLIPS (C Language Integrated Production System, Giarratano and Riley, 2005) programming language was used. Knowledge representation was based on the system of “if-then” rules, each of which consisted of a premise and a conclusion. The “if-then” rules used in the present study were extracted from the three types of decision trees (classification and regression trees - CART, chi-square automatic interaction detector trees - CHAID and quick, unbiased, efficient statistical trees - QUEST). Details about the development of these models are presented in Zaborski et al., (2016, 2017). The total number of rules utilized by the RBM system was 46 (15 for heifers and 31 for cows). To determine them, a training set of 1006 and 1275 records (for heifers and cows, respectively) was applied. It was a randomly selected part of the whole dataset used for model building. After construction, the RBM was tested on an independent, randomly selected test set of 336 and 424 records (for heifers and cows, respectively). This set was used for the verification of the system predictive performance.
        
The last part of the RBM was the inference engine, whose role was to detect cows with potential problems at parturition (Rutkowski, 2012). The rule-based inference process was based on conclusions inferred from the set of facts and rules for a specific case (calving) in a heifer or a cow. The forward reasoning algorithm implemented in the CLIPS language was used for this type of inference. An example user interface of the RBM system is shown in Fig. 2. The program asks a set of questions based on the values of the predictor variables and returns a predicted calving category.
 

Fig 2: The screenshot from the CLIPS editor showing the rule- based module in action.


        
The proportion of correctly identified calvings from each class (easy, moderate and difficult) and the overall accuracy for the heifer test dataset (the subset of calving records separated from the whole dataset and used for the final evaluation of the system predictive abilities) were: 26.13%, 76.52%, 77.27% and 60.12%, respectively, whereas the respective values for the cow dataset were: 59.18%, 69.01%, 0% and 62.03%.
        
The RBM system developed in the present study has a user-friendly interface that is intended to help farmers diagnose dystocia in the herd. The “if-then” rules extracted from the three types of decision trees (CART, CHAID and QUEST) were implemented in the form of a single, integrated decision support system that facilitates the application of such rules under field conditions by asking several questions about an individual animal. The analysis of the RBM predictive performance on the independent test set in heifers showed that it yielded similar results to those obtained by each decision tree separately. The total accuracy of the RBM system was even slightly higher than that for CHAID and QUEST. The proportion of correctly indicated difficult calvings in heifers by RBM was also higher than that diagnosed by QUEST. In the case of heifers (Zaborski et al., 2017), the proportions of correctly identified easy, moderate and difficult calvings on the independent test set by CART were 35.14%, 68.70% and 77.27%. The total accuracy was 60.41%. The respective values for CHAID were 18.92%, 73.91%, 85.45% and 59.52%, whereas those for QUEST were 19.82%, 81.74%, 73.64% and 58.63%.
        
The analysis of the RBM system performance in cows carried out on the independent test set showed that its overall accuracy was better than that for CART but worse than that for CHAID and QUEST. None of the decision trees and, consequently, the RBM system could recognize difficult calvings in cows (the proportion of correctly indicated dystocic cases was null). The percentages of correctly identified easy, moderate and difficult calvings in cows on the independent test set by CART were 60.20%, 71.36% and 0% (Zaborski et al., 2016). The total accuracy was 60.41%. The respective values for CHAID were 65.31%, 69.01%, 0% and 64.86%, whereas those for QUEST were: 68.88%, 64.79%, 0% and 64.39%.
        
The RBM system presented in the current study does not provide any graphical interface and the communication between the user (farmer) and the system has a textual form. However, further development of the system and incorporation of plots presenting the incidence of dystocia in the herd are possible in the future. Moreover, the aforementioned Mast system described by Allore and Jones (1995) included a total of 168 rules, whereas the RBM system developed in the present study had much fewer rules (approximately 46). In addition, these rules were extracted only from decision trees (CART, CHAID and QUEST), while those included in the Mast system were also created with the help of experts in the field. The rest of them were formulated based on the reference values for the different indicators of mastitis occurrence.
The RBM system developed in the present study may constitute a valuable tool for supporting the decision process in dystocia management on the farm. It was equipped with a user-friendly text interface that facilitates communication between the farmer and the system. The predictive performance of the RBM, whose rules were extracted from three different types of decision trees, was satisfactory and, in some cases, even surpassed that of individual decision trees. Only for the difficult category in cows, the system was ineffective in the correct detection of such calvings. However, its further development is possible in the future, especially by adding a graphical user interface and including the rules suggested by the experts.
This work was supported by the Polish Ministry of Science and Higher Education (grant number 517-01-028-3962/17). The abstract of this study was presented at the conference entitled “Life Sciences in the Contemporary World” held at the West Pomeranian University of Technology in Szczecin (Poland), June 5, 2017.

  1. Allore, H.G. and Jones, L.R. (1995). An approach to summarize somatic cell score trends for a data-driven, decision support system. Journal of Dairy Science, 78:1377–1381. DOI: 10.3168/jds.S0022-0302(95)76760-1.

  2. Balasundaram, B., Gupta, A.K., Dongre, V.B., Mohanty, T.K., Sharma, P.C., Khat, K., Singh, R.K. (2011a). Influence of genetic and non-genetic factors on incidence of calving abnormalities in Karan Fries cows. Indian Journal of Animal Research, 45:26–31.    Balasundaram, B., Gupta, A.K., Dongre, V.B., Mohanty, T.K., Sharma, P.C., Khate, K., Singh, R.K. (2011b). Influence of genetic and non-genetic factors on incidence of post partum utero-vaginal complications in Karan Fries cows. Indian Journal of Animal Research, 45:192–197.

  3. Domecq, J.J., Nebel, R.L., McGilliard, M.L., Pasquino, A.T. (1991). Expert system for evaluation of reproductive performance and management. Journal of Dairy Science, 74:3446–3453. DOI: 10.3168/jds.S0022-0302(91)78534-2.

  4. Ercan, N., Yokuº, B., Gûn, M., Koçhan, A. (2017). Paraoxonase activity an indicator of complications at early stage of complicated pregnant cows. Indian Journal of Animal Research, 51:927–931. DOI: 10.18805/ijar.v0iOF.8459.

  5. Giarratano, J. and Riley, G. (2005). Expert systems: Principles and programming. Thomson Publications, Boston, MA. pp. 288.

  6. Mane, P.M. and Bhangre, R.D. (2015). Outcome of different regimes of treatment for uterine torsion in bovine at field level – A clinical study. Indian Journal of Animal Research, 49:819–822. DOI: 10.18805/ijar.7045.

  7. McHugh, N., Kearney, J.F., Berry, D.P. (2011). The effect of dystocia on subsequent performance in dairy cows. Moorepark Research Report, 2011:15. 

  8. Mee, J. F. (2008). Prevalence and risk factors for dystocia in dairy cattle: A review. The Veterinary Journal, 176:93–101. DOI: 10.1016/j.tvjl.2007.12.032.

  9. Pellerin, D., Levallois, R., St-Laurent, G., Perrier, J.-P. (1994). LAIT-XPERT VACHES: an expert system for dairy herd management. Journal of Dairy Science, 77:2308–2317. DOI: 10.3168/jds.S0022-0302(94)77174-5.

  10. Pogorzelska, P. and Nogalski, Z. (2010). Calving difficulty in cows and heifers of the Polish dairy cattle population in 2007-2008. Scientific Annals of Polish Society of Animal Production, 6:103–110.

  11. Rutkowski, L. (2012). Methods and techniques of artificial intelligence. PWN, Warsaw. pp. 434.

  12. Zaborski, D., Grzesiak, W., Kotarska, K., Szatkowska, I., Jedrzejczak, M. (2014). Detection of difficult calvings in dairy cows using boosted classification trees. Indian Journal of Animal Research, 48:452-458. DOI: 10.5958/0976-0555.2014.00010.7.

  13. Zaborski, D., Proskura, W.S., Grzesiak, W. (2016). Classification of calving difficulty scores using different types of decision trees. Acta Scientiarum Polonorum Zootechnica, 15:55–70. DOI: 10.21005/asp.2016.15.4.05.

  14. Zaborski, D., Proskura, W.S., Grzesiak, W. (2017). Comparison between data mining methods to assess calving difficulty in cattle. Revista Colombiana de Ciencias Pecuarias, 30:196–208. DOI: 10.17533/udea.rccp.v30n3a03.

Editorial Board

View all (0)