# ML-Based Prediction of Carbon Emissions for Potato Farms in Iran

Seyedeh Razieh Ehsani Amrei, Lakshmi Babu-Saheer, Cristina Luca

► To cite this version:

Seyedeh Razieh Ehsani Amrei, Lakshmi Babu-Saheer, Cristina Luca. ML-Based Prediction of Carbon Emissions for Potato Farms in Iran. 19th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2023, León, Spain. pp.352-361, 10.1007/978-3-031-34107-6_28. hal-05498083

HAL Id: hal-05498083

https://inria.hal.science/hal-05498083v1

Submitted on 6 Feb 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# ML-Based Prediction of Carbon Emissions for Potato Farms in Iran

Seyedeh Razieh Ehsani Amrei✉, Lakshmi Babu-Saheer✉, and Cristina Luca✉

School of Computing and Information Sciences, Anglia Ruskin University,
Cambridge, UK
se573@pgr.aru.ac.uk, {lakshmi.babu-saheer,cristina.luca}@aru.ac.uk

**Abstract.** Agriculture is one of the main contributors to carbon emissions. Understanding different processes involved in farming and estimating the carbon emissions in each step can help in accurately calculating the carbon factor and support in optimizing and reducing the carbon emissions. Potato is a popular food product cultivated across the world. Potato farming involves several processes such as preparing the land, using fertilizers and manures, irrigation, and plowing, and all these steps have been contemplated to generate carbon emissions. This article investigates the steps involved in potato cultivation as a case study and generates standardized features related to carbon emissions in each step. Different machine learning and deep learning algorithms are used to model these standard features. This research predicts the carbon emission using different regression models such as random Forest, multiple linear regression, lasso regression, K-Nearest Neighbour, and neural network regression and finally compares them based on the metrics of root-mean-square error (RMSE) and $R^2$. The results show that all the models have comparable performance with a $R^2$ score very close to 1 and very low RMSE. The novelty of the work is in introducing standard features for modeling carbon emissions in agriculture which help to streamline different farming datasets even across different crops.

**Keywords:** Carbon factor · Farming · Feature Standardisation · Regression models · Machine Learning · Deep Learning

## 1 Introduction

The world population is currently approximately 7.9 billion, which is estimated to reach 9.7 billion by 2050, and may even reach 11.2 billion by 2100 [20]. The need for food in the world is expected to increase due to this growing population which calls for a rapid increase in food production, both in agriculture and factory-processed food products. Some studies have also reported a sudden surge in the amount of food intake by individuals [19]. Potato is one of the popular food among people and paying attention to its production process will be beneficial both in terms of climate and economy. Agricultural crops including
potatoes have the potential to play an important role in reducing climate change. Farming processes can be optimized to reduce greenhouse gas (GHG) emissions and hence, support climate action. Potato often has lower GHG emissions and water needs than other staple products (maize, rice, and wheat) on a per-calorie basis [12]. A comparative study on potatoes, pasta, and basmati rice using the life cycle assessment (LCA) approach showed that potato production and distribution generated less carbon than pasta and basmati rice [7]. But any amount of carbon emission optimization can support climate action and can be easily translated and generalized to other food products. Research on four types of potato production in Zimbabwe showed that the use of fertilizers and emissions from soil contributed to the largest proportion of carbon emissions [18]. Common features like energy and fuel consumption can be identified for each stage of farming and can be translated into carbon equivalent which in total will help in the prediction of carbon emissions across all farming processes. Similar studies on potato farms have proved that GHG emissions can be reduced by cutting down the energy usage [4]. LCA has been used traditionally to estimate energy consumption but, recently, Machine Learning algorithms have been proven to be more powerful.

This paper presents a novel approach for predicting the carbon factor in potato farming by using standardized features. The farming-related information from the dataset considered in this research is transformed into standard features that represent the carbon factors in each step of the entire farming process. Such efforts of standardization of features can help to align different datasets and streamline features used for carbon emission modeling without having to deal with the intricate details or differences in farming conditions even across different crops. The potato farming dataset is used as a case study here. This technique can be easily scaled to other crops or farms. Five Machine Learning models have been evaluated and their results compared using two different metrics.

This paper is organized as follows. Section 2 presents the related work; Sect. 3 describes the methods used in this research; Sect. 4 discusses the results and presents the evaluation done. Finally, the conclusions are drawn in Sect. 5 where future work is also presented.

## 2 Related Work

Environmental degradation and climate crisis are among the most complex issues in the world today that require creative solutions to improve the situation. In total, about 65% of GHG emissions are generated by the energy sector, while about 15% is from agriculture [11,16]. Farmers are often concerned about crop protection, weather forecasting, proper irrigation management, site nutrient management, and crop yield as well as harvesting prediction [3], while most of the time, GHG emissions and their impact on the environment are neglected. In this regard, research performed in Slovenia developed a model to calculate the total greenhouse gas emission of agricultural products including grains and fruit as an entire integrated process. Results showed energy consumption and productivity have an influence on the amount of carbon footprint [2].
A comprehensive discussion about the role of artificial intelligence (AI) and Internet of Things (IoT) analysis in agri-food systems including greenhouse monitoring has been presented by Misra et al. [14]. AI can be used in validating food production processes and predicting parameters such as carbon footprint [13]. In [15], an artificial neural network (ANN) was selected as the best model to predict the output of energy including carbon emission. The findings showed in rice production that farm emissions have an important influence on global warming and acidification. A long short-term memory (LSTM) method is used as a deep learning approach for forecasting time-series carbon dioxide emission in [5]. [17] shows that the Support Vector Machine (SVM) has been successfully used to predict carbon emission in the alcohol industry and had the smallest Root Mean Square Error (RMSE).

Our study follows the research of [9], which investigated the GHG emission and energy output in potato farming using an ANN model. Other reviewed studies have not fully considered the characteristics of crop cultivation or have not used machine learning algorithms to improve the results. This paper attempts to consider both neglected characteristics and various Machine Learning models. [9] shows that the important factors in emitting carbon for potato cultivation are electricity, fertilizer and seeds, and the total amount of carbon released was calculated as 116.4 kg for every ton of potatoes produced. The authors used an artificial neural network, and the coefficient of determination ($R^2$) was reported to be 0.98 for energy and 0.99 for greenhouse gas emissions [9]. Also, in the previous study, the standardization of the features was not done. In addition, work has been done on bespoke data and only one model of artificial intelligence was used to carry out. These gaps have strengthened the need for more research in the field of investigating the carbon factor in potato cultivation.

In our proposed research, more generic novel features are taken into account to achieve a more realistic result that can be translated and generalized to other farms and products around the world. The carbon emission is calculated more accurately for each step, compared to the previous study. A comprehensive range of algorithms is investigated in this study to obtain more precise and reliable results.

# 3 Methodology

## 3.1 Potato Farm Dataset

The potato farm dataset used in this study was collected in 2013 in Fereydounshahr, Isfahan province, Iran. This dataset has information on 266 potato farms, collected through face-to-face questionnaires, and has been used to estimate energy consumption and carbon emissions [9]. This dataset contains a set of field information including land area, type of irrigation, tools of plowing, application of different fertilizers, and diesel and electricity consumption. Figure 1 highlights the percentage of energy consumption in different parts of farm operation in potato prediction.
<figure><img src="image_3.png" /><figcaption>Fig. 1. Carbon produced from different sectors of potato farms [9]</figcaption></figure>

## 3.2 Feature Standardisation and Engineering

There is a common set of operations for the production of potatoes, which are often used across all parts of the world. These stages and operations of potato cultivation require different resources of energy as highlighted in Fig. 2.

<figure><img src="image_4.png" /><figcaption>Fig. 2. Inputs and activities which cause carbon emission in potato production</figcaption></figure>

Following a detailed analysis of the dataset, the following features have been selected to be considered in this study as inputs for carbon emission prediction: the cultivated area, the total amount of product harvested from the unit area, the total amount of seed required per unit area, soil texture, the amount of phosphate, potassium, and nitrogen fertilizer per unit surface, the amount of animal manure per unit area, the quantity of vinegar per unit land surface, amount of toxins needed for the production, irrigation type, irrigation frequency, amount of time spent for each irrigation, the total amount of water, fuel, and electricity consumption.

This research proposes a novel set of features, listed in Table 1, to estimate carbon emissions on the basis of the standardization of features identified for farming. Table 1 also shows the carbon emission coefficient values for each of
these input features along with related references that were identified for calculating the corresponding carbon coefficients.

Equation 1 calculates PCE, the total carbon emission in the potato farming process.

$$PCE = \sum_{i=1}^{k} I_{i} * CE_{i} \qquad (1)$$

where $I_i$ is the amount of input for step $i$; $CE_i$ is the carbon coefficient of step $i$ as displayed in Table 1; $i$ refers to each separate process related to planting, growing and harvesting potatoes for which the carbon emissions are calculated; $k$ is the total number of features.

<table><caption>**Table 1.** Carbon emission coefficients in potato farm</caption><thead><tr><td>Input Features</td><td>Unit for Coefficients</td><td>Carbon coefficient (kgCO2eq/unit)</td></tr></thead><tbody><tr><td>Diesel fuel</td><td>L</td><td>2.76 [10]</td></tr><tr><td>Nitrogen</td><td>Kg</td><td>1.3 [10]</td></tr><tr><td>Phosphate</td><td>Kg</td><td>0.2 [10]</td></tr><tr><td>Potassium</td><td>Kg</td><td>0.2 [10]</td></tr><tr><td>Electricity</td><td>Kwh</td><td>0.608 [8]</td></tr><tr><td>Herbicides</td><td>Kg</td><td>6.3 [10]</td></tr><tr><td>Insecticide</td><td>Kg</td><td>5.1 [10]</td></tr><tr><td>Seed</td><td>Ton</td><td>115 [6]</td></tr><tr><td>Soil</td><td>Ha</td><td>437 [6]</td></tr><tr><td>Farm Yard Manure</td><td>Kg</td><td>81.2 [1]</td></tr></tbody></table>

## 3.3 The Regression Models

Four Machine Learning regression models - Random Forest, Multiple Linear Regression, Lasso Regression, K-Nearest Neighbour, and Neural network regression have been used and evaluated in this research. General data cleanup and pre-processing are carried out by removing the missing values in the dataset. The dataset is split into train and test sets with an 80-20% ratio and training data are further divided into validation sets for performing k-fold validation. The models are trained with appropriate hyperparameter optimization in each case. Finally, each model is evaluated with the root mean square error (RMSE) and R² metrics.
# 4 Results and Evaluation

The coefficient of determination ($R^2$ score) has been used to validate the model predictability, and the performance of applied machine learning models is compared against the feed-forward neural network results presented in an earlier work [9]. To benchmark the ML models, 5-fold cross-validation was utilized along with grid search to find the best hyperparameters on a train-test split of 80-20%. Both R-squared, a relative measure of fit, and RMSE an absolute measure of fit have been used to validate the models. As the square root of the variance, RMSE can be interpreted as the standard deviation of the unexplained variance. It has the useful property of being in the same units as the response variable. Lower values of RMSE indicate a better fit. Notably, all models show comparable performance, and none of them performs significantly better than others as demonstrated in Table 2.

<table><caption>**Table 2.** ML models performance</caption><thead><tr><td>Models</td><td>R<sup>2</sup></td><td>RMSE</td></tr></thead><tbody><tr><td>Multiple Linear Regression</td><td>0.9642</td><td>0.0447</td></tr><tr><td>Lasso Regression</td><td>0.9999</td><td>0.0006</td></tr><tr><td>Random Forest Regression</td><td>0.9862</td><td>0.0242</td></tr><tr><td>KNN Regression</td><td>0.9556</td><td>0.0436</td></tr><tr><td>Neural Network Regression</td><td>0.9996</td><td>0.0039</td></tr><tr><td>Feed Forward Neural Network [9]</td><td>0.9989</td><td>0.0273</td></tr></tbody></table>

The strength and direction coefficients of the relationship between two variables can be estimated using the regression coefficient formula. In the current research, a 5-fold cross-validation grid search is used to fine-tune the hyperparameters. For example, in the Multi Linear Regression (MLR) model, the results can be seen in Fig. 3a. It is clearly visible that the efficiency of this model is significantly improved by increasing the number of features. However, as soon as the number of features exceeds 17, the model saturates and becomes overfitted. Therefore, we determined through empirical experiments that the optimal number of features for the MLR model is 17. The performance of the model as measured by the $R^2$ score is equal to 0.96 in the most optimal state before saturation. The plot of the MLR features' coefficients is displayed in Fig. 4.

Figure 3b illustrates that by implementing the same method for the Lasso Regression model and running a grid search on the Alpha hyperparameter, the best performance is achieved when the Alpha is equal to 0.0 where the $R^2$ score of the model reaches 0.99. The results obtained indicate that with the increase of alpha, the performance of the model decreases. The best alpha obtained is equal to 0.0, which means that the Lasso model will behave similarly to an Ordinary Least Squares Regression model. The Lasso features coefficients chart
<figure><img src="image_5.png" /><figcaption>(a) Number of features vs $R^2$ in MLR</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>(c) Maximum depth vs $R^2$ in RF</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>(b) Alpha vs $R^2$ in Lasso regression</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>(d) Number of neighbours vs $R^2$ in KNN</figcaption></figure>

**Fig. 3.** Results of a grid search using 5-fold cross-validation to find the best hyperparameters for each model.

<figure><img src="image_9.png" /><figcaption>**Fig. 4.** MLR Coefficients</figcaption></figure>

is displayed in Fig. 5. The performance obtained using a grid search on hyperparameters with cross-validation for the Random Forest model is shown in Fig. 3c. The best result is achieved for depth 8, where $R^2$ of the model reaches 0.98. The plot of Random Forest feature importance can be found in Fig. 6. In the KNN model, the most important hyperparameter is the number of neighbours. By applying grid search on hyperparameter values using cross-validation for this model, the best result is obtained for $k = 6$, where the $R^2$ of the model is equal to 0.95 which can be seen in Fig. 3d. It can be concluded that simple
models can perform this task as effectively as or sometimes even better than
neural networks with better explainability.

<figure><img src="image_10.png" /><figcaption>Fig. 5. Lasso Coefficients</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig. 6. Feature Importance of the Random Forest Model</figcaption></figure>

The effectiveness of the features being used in our models is also analyzed
through feature importance visualizations as presented in this section. It can
be noted that different models emphasize a different set of features but give
comparable results. Figure 4 shows the coefficients of the multi-linear regression
model. MLR performs feature selection and it seems like fuel used especially for
transport and other process plays a major role. Figure 5 shows coefficients of the
Lasso regression model. Apart from the fuel, this model also gives importance
to the size of the farms. Figure 6 shows the feature importance of the Random Forest regression model which also identifies the fuel and farm size as important features, but also relates to the amount of product harvested as one of the main features. This further emphasizes that standard features like the fuel and energy per unit area or per unit weight of the product can be good candidates to unify the farming features and modeling.

# 5 Conclusions and Future Work

In recent years, researchers have investigated the amount of energy consumption in both agricultural production and industries in order to minimize the amount of carbon emissions. However, there is a scarcity of accurate, clean data that could be used for training artificial intelligence algorithms effectively in this domain. In this study, we demonstrate how features can be standardised across different farms to build simple ML models for this task and how these frameworks can predict carbon emissions in potato production as a case study. This paper presents the results of multiple ML models that were investigated with these novel features representing the farming processes, and it is observed that all ML models achieve comparable results with almost the same amount of computational resources and data samples. In this research, potato agricultural land is only considered as a case study, this means that these models and approaches can be used for similar crop cultivations if sufficient data is available. Simpler ML models can further provide better insights into the features being modeled through the feature importance visualizations. In the current research, prediction for the amount of carbon released was applied to only one product with a selected range of machine learning models. There is great potential for the proposed features and models to be scaled and generalized to other products and regions investigating more models using reliable datasets.

**Acknowledgement.** We thank the data providers of this work. Datasets were collected by the authors of [9] from the Faculty of Agricultural Engineering and Technology, University of Tehran, Karaj, Iran.

# References

1. Aguirre-Villegas, H.A., Larson, R.A.: Evaluating greenhouse gas emissions from dairy manure management practices using survey data and lifecycle tools. J. Clean. Prod. **143**, 169–179 (2017)

2. Al-Mansour, F., Jejcic, V.: A model calculation of the carbon footprint of agricultural products: The case of slovenia. Energy **136**, 7–15 (2017)

3. Angarita-Zapata, J.S., Alonso-Vicario, A., Masegosa, A.D., Legarda, J.: A taxonomy of food supply chain problems from a computational intelligence perspective. Sensors **21**(20), 6910 (2021)

4. Bakhtiari, A.A., Hematian, A., Moradipour, M., et al.: Energy, economic and GHG emissions analysis of potato production. J. Biodivers Environ. Sci. **6**(2), 398–406 (2015)
5. Chen, C.Y., Chai, K.K., Lau, E.: Ai-assisted approach for building energy and carbon footprint modeling. Energy AI **5**, 100091 (2021)

6. Haverkort, A., Hillier, J.G.: Cool farm tool-potato: model description and performance of four production systems. Potato Res. **54**, 355–369 (2011)

7. Hess, T., Chatterton, J., Daccache, A., Williams, A.: The impact of changing food choices on the blue water scarcity footprint and greenhouse gas emissions of the British diet: the example of potato, pasta and rice. J. Clean. Prod. **112**, 4558–4568 (2016)

8. Khodi, M., Mousavi, S.: Life cycle assessment of power generation technology using GHG emissions reduction approach. In: 7th National Energy Congress, pp. 22–23 (2009)

9. Khoshnevisan, B., Rafiee, S., Omid, M., Mousazadeh, H., Rajaeifar, M.A.: Application of artificial neural networks for prediction of output energy and GHG emissions in potato production in Iran. Agric. Syst. **123**, 120–127 (2014)

10. Lal, R.: Carbon emission from farm operations. Environ. Int. **30**, 981–990 (2004)

11. Li, Y., Han, M., Liu, S., Chen, G.: Energy consumption and greenhouse gas emissions by buildings: a multi-scale perspective. Build. Environ. **151**, 240–250 (2019)

12. Liu, B., et al.: Promoting potato as staple food can reduce the carbon-land-water impacts of crops in china. Nature Food **2**(8), 570–577 (2021)

13. Milczarski, P., Zieliński, B., Stawska, Z., Hłobaż, A., Maślanka, P., Kosiński, P.: Machine learning application in energy consumption calculation and assessment in food processing industry. In: Rutkowski, L., Scherer, R., Korytkowski, M., Pedrycz, W., Tadeusiewicz, R., Zurada, J.M. (eds.) ICAISC 2020. LNCS (LNAI), vol. 12416, pp. 369–379. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-61534-5_33

14. Misra, N., Dixit, Y., Al-Mallahi, A., Bhullar, M.S., Upadhyay, R., Martynenko, A.: IoT, big data, and artificial intelligence in agriculture and food industry. IEEE Internet Things J. **9**(9), 6305–6324 (2020)

15. Nabavi-Pelesaraei, A., Rafiee, S., Mohtasebi, S.S., Hosseinzadeh-Bandbafha, H., Chau, K.W.: Integration of artificial intelligence methods and life cycle assessment to predict energy output and environmental impacts of paddy production. Sci. Total Environ. **631**, 1279–1294 (2018)

16. Röck, M., Saade, M.R.M. Balouktsi, M., Rasmussen, F.N., Birgisdottir, H., Frischknecht, R., Habert, G., Lützkendorf, T., Passer, A.: Embodied GHG emissions of buildings-the hidden challenge for effective climate change mitigation. Appl. Energy **258**, 114107 (2020)

17. Saleh, C., Dzakiyullah, N.R., Nugroho, J.B.: Carbon dioxide emission prediction using support vector machine. In: IOP Conference Series: Materials Science and Engineering. vol. 114, p. 012148. IOP Publishing (2016)

18. Svubure, O., Struik, P., Haverkort, A., Steyn, J.M.: Carbon footprinting of potato (solanum tuberosum L.) production systems in Zimbabwe. Outlook Agric. **47**(1), 3–10 (2018)

19. Tilman, D., Balzer, C., Hill, J., Befort, B.L.: Global food demand and the sustainable intensification of agriculture. In: Proceedings of the National Academy of Sciences of the United States of America, vol. 108, pp. 20260–20264 (2011). https://doi.org/10.1073/pnas.1116437108

20. UN Desa: https://www.un.org/development/desa/en/news/population/world-population-prospects-2017.html (2017)