Application of classification machine learning algorithms for characterizing nutrient transport in a clay plain agricultural watershed

J Environ Manage. 2023 Nov 1:345:118924. doi: 10.1016/j.jenvman.2023.118924. Epub 2023 Sep 6.

Abstract

Excess nutrients in surface water and groundwater can lead to water quality deterioration in available water resources. Thus, the classification of nutrient concentrations in water resources has gained significant attention during recent decades. Machine learning (ML) algorithms are considered an efficient tool to describe nutrient loss from agricultural land to surface water and groundwater. Previous studies have applied regression and classification ML algorithms to predict nutrient concentrations in surface water and/or groundwater, or to categorize an output variable using a limited number of input variables. However, there have been no studies that examined the application of different ML classification algorithms in agricultural settings to classify various output variables using a wide range of input variables. In this study, twenty-four ML classification algorithms were implemented on a dataset from three locations within the Upper Parkhill watershed, an agricultural watershed in southern Ontario, Canada. Nutrient concentrations in surface water were classified using geochemical and physical water parameters of surface water and groundwater (e.g., pH), climate and field conditions as the input variables. The performance of these algorithms was evaluated using four evaluation metrics (e.g., classification accuracy) to identify the optimal algorithm for classifying the output variables. Ensemble bagged trees was found to be the optimal ML algorithm for classifying nitrate concentration in surface water (accuracy of 90.9%), while the weighted KNN was the most appropriate algorithm for categorizing the total phosphorus concentration (accuracy of 87%). The ensemble subspace discriminant algorithm gave the highest overall classification accuracy for the concentration of soluble reactive phosphorus and total dissolved phosphorus in surface water with an accuracy of 79.2% and 77.9%, respectively. This study exemplifies that ML algorithms can be used to signify exceedance of recommended concentrations of nutrients in surface waters in agricultural watersheds. Results are useful for decision makers to develop nutrient management strategies.

Keywords: Agricultural watershed; Groundwater; Machine learning classification algorithms; Monitoring; Nutrient transport; Surface water.

MeSH terms

  • Algorithms*
  • Clay
  • Machine Learning*
  • Nutrients
  • Ontario
  • Phosphorus

Substances

  • Clay
  • Phosphorus