# Table_1_Causal structure search and modeling of precision dairy farm data for automated prediction of ketosis risk, and the effect of potential interventions.docx

Causal search techniques enable inference from observational data, such as that produced in Precision Livestock Farming. The Peter-Clark algorithm was used to produce four causal models, for the risk of ketosis in individual cows. The data set covered 1542 Holstein-Friesian cows on a commercial dairy farm in Slovakia, over a period of 18 months and had 483 variables, split into four samples for four-way cross validation. The cow data was sorted into quartiles by predicted postpartum blood ketone value. The observed incidences of ketosis by quartile were 3.14%, 6.35%, 6.77%, 15.1%. To test the effect of intervention on the reduction of ketosis cases on the farm, we predicted the expected effect of 20% lower dry matter in the total mixed ration over the 6 months pre-partum. Predicted reductions in incidence of ketosis for the highest risk (4th) quartile were -4.96%, -7.4%, -11.21%, and -11.07% of animals in the herd, respectively for the four models. The different predictions were due to the different causal structures estimated from the four data samples by the Peter-Clark causal model search algorithm. To accurately predict the effect of intervention for automatic optimization of herd performance it is necessary to determine the correct causal structure of the model. Collinearity of inputs due to e.g. grouping by pens, reduced the conditional independence of their effects, and therefore the ability of the Peter-Clark algorithm to determine the correct causal structure. To reduce the collinearity of variables, we recommend causal search on datasets from multiple farms or multiple years.