Explainable AI for Smart Characterization of Dairy-Lagoon Wastewater Using Farm-Held-Out Validation
AgriEngineering · 16.11.2026 · 8 (11) · 492
DOI: 10.3390/agriengineering8110492 ↗Kurz gefasst
Fachartikel in der Zeitschrift AgriEngineering, online erschienen am 16.11.2026. Verfasst von Abdullah Al Rawi und 3 weiteren Autor:innen. Die Arbeit nennt 40 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).
Abstract (Originalsprache)
Commercial dairy farms are essential to milk production, food security, and rural economies, but they also generate large volumes of manure and wastewater requiring reliable characterization. Measuring solids, organic matter, and dissolved constituents is important for pollution control, nutrient management, and resource recovery. Artificial intelligence may reduce analytical burden, although its usefulness depends on demonstrating that predictions generalize across farms and that model explanations are scientifically credible. This study evaluated 205 lagoon-manure samples collected between May and August 2021, within a four-year project, from 18 commercial dairies in California’s Central Valley. Sample availability varied among measurements and modeling tasks because of missing observations. Gravimetric and chemical measurements were analyzed using polynomial ridge regression, random forest, and XGBoost with farm-held-out cross-validation; validated models were interpreted using SHAP and LIME. All 205 samples had complete gravimetric records, and chemical measurements were available for 155 samples. Samples averaged 96.02% moisture, 3.98% total solids, and 3.06% organic matter. Organic matter was predicted from the combined gravimetric measurements (R2 = 0.975, RMSE = 0.97 percentage points, MAE = 0.39, and RPD = 6.32). Total solids alone produced similar pooled performance (R2 = 0.979; RPD = 6.86), and a linear regression on total solids performed comparably (R2 = 0.980). However, prediction errors were strongly concentration dependent. For the linear benchmark, mean absolute errors represented approximately 56%, 21%, and 11% of mean organic-matter concentrations in samples containing 10% total solids, respectively. These findings indicate that strong pooled performance does not establish reliable screening accuracy for highly dilute samples. In contrast, nitrate, sodium, salinity, calcium, and pH could not be predicted reliably (R2 = −0.431 to 0.091; RPD = 0.84–1.05). SHAP identified moisture–solids as the dominant contributor to organic-matter predictions, whereas LIME supported sample-level interpretation. These findings apply to flush-based dairies in California’s Central Valley, and this approach can support low-cost screening of dairy-lagoon manure for organic matter while directing chemically governed properties to laboratory measurement.
Zitieren
APA
Rawi, A. A., Pandey, P., Pakzadeh, B., & Pandey, P. (2026). Explainable AI for Smart Characterization of Dairy-Lagoon Wastewater Using Farm-Held-Out Validation. AgriEngineering, 8(11), 492. https://doi.org/10.3390/agriengineering8110492
Vancouver
Rawi AA, Pandey P, Pakzadeh B, Pandey P. Explainable AI for Smart Characterization of Dairy-Lagoon Wastewater Using Farm-Held-Out Validation. AgriEngineering. 2026;8(11):492. doi:10.3390/agriengineering8110492
BibTeX
@article{Rawi2026,
author = {Rawi, Abdullah Al and Pandey, Prachi and Pakzadeh, Behrooz and Pandey, Pramod},
title = {Explainable AI for Smart Characterization of Dairy-Lagoon Wastewater Using Farm-Held-Out Validation},
journal = {AgriEngineering},
year = {2026},
volume = {8},
number = {11},
pages = {492},
doi = {10.3390/agriengineering8110492}
}
EUVIMED