Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Sustain. Food Syst.

Sec. Climate-Smart Food Systems

Predicting Methane Emissions in Smallholder Dairy Systems: A Clustering and Ensemble Learning Approach

Provisionally accepted
  • 1Singapore American School, Singapore, Singapore
  • 2Massachusetts Institute of Technology, Cambridge, United States

The final, formatted version of the article will be published soon.

Methane (CH4) is the second most prevalent anthropogenic greenhouse gas and a major driver of climate change. In Indonesia, smallholder dairy farms significantly contribute to national CH4 emissions, primarily through enteric fermentation and manure management. However, these farms often lack access to effective tools for monitoring and mitigating emissions. This study introduces a machine learning based framework to predict CH4 emissions from 32 smallholder dairy farms in Lembang, Indonesia. The farms were first clustered using K-means, to find groups of similar farm types. Then, different models were built to predict future CH4 emissions for each cluster by testing six approaches: linear regression, polynomial regression, Random Forest, XGBoost, SVR and ARIMA. Stacked ensemble models–using unclustered, clustered and a hybrid mix of base predictions–were then developed to integrate the strengths of each approach. Performance was evaluated using both time-based train-test splits and cross validation to test for real world deployment and generalizability to other farms. The hybrid stacked model outperformed unclustered individual models in cross validation evaluation, achieving high accuracy across all emission types—enteric, manure, and total. Confidence and prediction interval analyses further confirmed its stability in predictive behavior, independent of measurement uncertainty. Overall, the proposed hybrid ensemble–clustering framework demonstrates the feasibility of machine learning–based CH4 forecasting in smallholder dairy systems, with implications for targeted mitigation and climate-smart policy planning.

Keywords: smallholder dairy farm, ensemble learning, clustering, methane emissions, sustainable agriculture, Indonesia, machine learning, methane emission forecast

Received: 18 Jul 2025; Accepted: 12 Nov 2025.

Copyright: © 2025 Choo and Raghavan. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Winston Choo, winstonchoo.zjc@gmail.com

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.