Predicting Grass Growth for Sustainable Dairy Farming: A CBR System Using Bayesian Case-Exclusion and Post-Hoc, Personalized Explanation-by-Example (XAI)

  • Eoin M. KennyEmail author
  • Elodie Ruelle
  • Anne Geoghegan
  • Laurence Shalloo
  • Micheál O’Leary
  • Michael O’Donovan
  • Mark T. Keane
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11680)


Smart agriculture has emerged as a rich application domain for AI-driven decision support systems (DSS) that support sustainable and responsible agriculture, by improving resource-utilization through better on-farm, management decisions. However, smart agriculture’s promise is often challenged by the high barriers to user adoption. This paper develops a case-based reasoning (CBR) system called PBI-CBR to predict grass growth for dairy farmers, that combines predictive accuracy and explanation capabilities designed to improve user adoption. The system provides post-hoc, personalized explanation-by-example for its predictions, by using explanatory cases from the same farm or county. A key novelty of PBI-CBR is its use of Bayesian methods for case exclusion in this regression domain. Experiments report the tradeoff that occurs between predictive accuracy and explanatory adequacy for different parametric variants of PBI-CBR, and how updating Bayesian priors each year reduces error.


CBR Bayesian analysis Smart agriculture Case exclusion XAI 



This publication has emanated from research conducted with the financial support of (i) Science Foundation Ireland (SFI) to the Insight Centre for Data Analytics under Grant Number 12/RC/2289 and (ii) SFI and the Department of Agriculture, Food and Marine on behalf of the Government of Ireland to the VistaMilk SFI Research Centre under Grant Number 16/RC/3835.


  1. 1.
    Gafsi, M., Legagneux, B., Nguyen, G., Robin, P.: Towards sustainable farming systems: effectiveness and deficiency of the French procedure of sustainable agriculture. Agric. Syst. 90(1–3), 226–242 (2006)CrossRefGoogle Scholar
  2. 2.
    Lindblom, J., Lundström, C., Ljung, M., Jonsson, A.: Promoting sustainable intensification in precision agriculture: review of decision support systems development and strategies. Precis. Agric. 18(3), 309–331 (2017)CrossRefGoogle Scholar
  3. 3.
    Murphy, K.P.: Conjugate Bayesian analysis of the Gaussian distribution. def, 1(2σ2), p. 16 (2007)Google Scholar
  4. 4.
    Ruelle, E., Hennessy, D., Delaby, L.: Development of the Moorepark St Gilles grass growth model (MoSt GG model): a predictive model for grass growth for pasture based systems. Eur. J. Agron. 99, 80–91 (2018)CrossRefGoogle Scholar
  5. 5.
    Poux, X., Aubert, P.M.: An agroecological Europe in 2050: multifunctional agriculture for healthy eating (2018)Google Scholar
  6. 6.
    Tintarev, N., Masthoff, J.: A survey of explanations in recommender systems. In: 2007 IEEE 23rd International Conference on Data Engineering Workshop, pp. 801–810. IEEE (2007)Google Scholar
  7. 7.
    Hurtado-Uria, C., Hennessy, D., Shalloo, L., O’Connor, D., Delaby, L.: Relationships between meteorological data and grass growth over time in the south of Ireland. Irish Geogr. 46(3), 175–201 (2013)CrossRefGoogle Scholar
  8. 8.
    Nikpour, H., Aamodt, A., Bach, K.: Bayesian analysis in a knowledge-intensive CBR system. In: 22nd UK Symposium on Case-Based Reasoning. Miltos Petridis (2017)Google Scholar
  9. 9.
    Leake, D.B.: Evaluating Explanations: A Content Theory. Psychology Press, London (2014)CrossRefGoogle Scholar
  10. 10.
    Branting, K., Hastings, J.D., Lockwood, J.A.: CARMA: a case-based range management advisor. In: IAAI, pp. 3–10, August 2001Google Scholar
  11. 11.
    Teagasc - 8/2/19: The Dairy Carbon Navigator. Improving Carbon Efficiency on Irish Dairy Farms.
  12. 12.
    Cho, Y., Cho, K., Shin, C., Park, J., Lee, E.-S.: A recommend service based on expert knowledge model in agricultural environments. In: Lee, G., Howard, D., Kang, J.J., Ślęzak, D. (eds.) ICHIT 2012. LNCS, vol. 7425, pp. 189–194. Springer, Heidelberg (2012). Scholar
  13. 13.
    Cunningham, P., Doyle, D., Loughrey, J.: An evaluation of the usefulness of case-based explanation. In: Ashley, K.D., Bridge, D.G. (eds.) ICCBR 2003. LNCS (LNAI), vol. 2689, pp. 122–130. Springer, Heidelberg (2003). Scholar
  14. 14.
    Holt, A.: Understanding environmental and geographical complexities through similarity matching. Compl. Int. 7, 1–16 (2000)Google Scholar
  15. 15.
    Bridge, D., Göker, M.H., McGinty, L., Smyth, B.: Case-based recommender systems. Knowl. Eng. Rev. 20(3), 315–320 (2005)CrossRefGoogle Scholar
  16. 16.
    Hart, P.: The condensed nearest neighbor rule (Corresp.). IEEE Trans. Inf. Theory 14(3), 515–516 (1968)CrossRefGoogle Scholar
  17. 17.
    Redmond, M.A., Highley, T.: Empirical analysis of case-editing approaches for numeric prediction. In: Sobh, T., Elleithy, K. (eds.) Innovations in Computing Sciences and Software Engineering, pp. 79–84. Springer, Dordrecht (2010). Scholar
  18. 18.
    Sørmo, F., Cassens, J., Aamodt, A.: Explanation in case-based reasoning–perspectives and goals. Artif. Intell. Rev. 24(2), 109–143 (2005)CrossRefGoogle Scholar
  19. 19.
    Smiti, A., Elouedi, Z.: Overview of maintenance for case based reasoning systems. Int. J. Comput. Appl. 975, 8887 (2011)Google Scholar
  20. 20.
    Gates, W.: The reduced nearest neighbor rule. IEEE Trans. Inf. Theory 18(3), 431–433 (1972)CrossRefGoogle Scholar
  21. 21.
    Ritter, G., Woodruff, H., Lowry, S., Isenhour, T.: An algorithm for a selective nearest neighbor decision rule. IEEE Trans. Inf. Theory 21, 665–669 (1975)CrossRefGoogle Scholar
  22. 22.
    Wilson, D.L.: Asymptotic properties of nearest neighbor rules using edited data. IEEE Trans. Syst. Man Cybern. 2, 408–421 (1972)MathSciNetCrossRefGoogle Scholar
  23. 23.
    Guan, D., Yuan, W., Lee, Y.K., Lee, S.: Nearest neighbor editing aided by unlabeled data. Inf. Sci. 179(13), 2273–2282 (2009)CrossRefGoogle Scholar
  24. 24.
    Aha, D.W., Kibler, D., Albert, M.K.: Instance-based learning algorithms. Mach. Learn. 6, 37–66 (1991)Google Scholar
  25. 25.
    Markovitch, S., Scott, P.D.: The role of forgetting in learning. In: Proceedings of the Fifth International Conference on Machine Learning, pp. 459–465 (1988)CrossRefGoogle Scholar
  26. 26.
    Pu, P., Chen, L.: Trust-inspiring explanation interfaces for recommender systems. Knowl.-Based Syst. 20(6), 542–556 (2007)CrossRefGoogle Scholar
  27. 27.
    Bruland, T., Aamodt, A., Langseth, H.: Architectures integrating case-based reasoning and bayesian networks for clinical decision support. In: Shi, Z., Vadera, S., Aamodt, A., Leake, D. (eds.) IIP 2010. IAICT, vol. 340, pp. 82–91. Springer, Heidelberg (2010). Scholar
  28. 28.
    Johns, T.: Phytochemicals as evolutionary mediators of human nutritional physiology. Int. J. Pharmacognosy 34(5), 327–334 (1996)CrossRefGoogle Scholar
  29. 29.
    Steinfeld, H., et al.: Livestock’s long shadow: environmental issues and options. Food & Agriculture Organization (2006)Google Scholar
  30. 30.
    Goodland, R., Anhang, J.: Livestock and climate change: What if the key actors in climate change are… cows, pigs, and chickens? (2009)Google Scholar
  31. 31.
    Keane, M.T., Kenny, E.M.: How Case Based Reasoning Explained Neural Networks: An XAI Survey of Post-Hoc Explanation-by-Example in ANN-CBR Twins. arXiv preprint arXiv:1905.07186 (2019)
  32. 32.
    Kenny, E.M., Keane, M.T.: Twin-systems to explain artificial neural networks using case-based reasoning: comparative tests of feature-weighting methods in ANN-CBR twins for XAI. In: Proceedings of the Twenty-Eight International Joint Conference on Artificial Intelligence (2019)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Eoin M. Kenny
    • 1
    • 2
    • 4
    Email author
  • Elodie Ruelle
    • 3
    • 4
  • Anne Geoghegan
    • 3
    • 4
  • Laurence Shalloo
    • 3
    • 4
  • Micheál O’Leary
    • 3
    • 4
  • Michael O’Donovan
    • 3
    • 4
  • Mark T. Keane
    • 1
    • 2
    • 4
  1. 1.School of Computer ScienceUniversity College DublinDublinIreland
  2. 2.Insight Centre for Data AnalyticsUCDDublinIreland
  3. 3.Teagasc, Animal and Grassland ResearchFermoyIreland
  4. 4.VistaMilk SFI CentreFermoyIreland

Personalised recommendations