Paddy harvest is extremely vulnerable to climate change and climate variations. It is a well-known fact that climate change has been accelerated over the past decades due to various human induced activities. In addition, demand for the food is increasing day-by-day due to the rapid growth of population. Therefore, understanding the relationships between climatic factors and paddy production has become crucial for the sustainability of the agriculture sector. However, these relationships are usually complex nonlinear relationships. Artificial Neural Networks (ANNs) are extensively used in obtaining these complex, nonlinear relationships. However, these relationships are not yet obtained in the context of Sri Lanka; a country where its staple food is rice. Therefore, this research presents an attempt in obtaining the relationships between the paddy yield and climatic parameters for several paddy grown areas (Ampara, Batticaloa, Badulla, Bandarawela, Hambantota, Trincomalee, Kurunegala, and Puttalam) with available data. Three training algorithms (Levenberg–Marquardt (LM), Bayesian Regularization (BR), and Scaled Conjugated Gradient (SCG)) are used to train the developed neural network model, and they are compared against each other to find the better training algorithm. Correlation coefficient (R) and Mean Squared Error (MSE) were used as the performance indicators to evaluate the performance of the developed ANN models. The results obtained from this study reveal that LM training algorithm has outperformed the other two algorithms in determining the relationships between climatic factors and paddy yield with less computational time. In addition, in the absence of seasonal climate data, annual prediction process is understood as an efficient prediction process. However, the results reveal that there is an error threshold in the prediction. Nevertheless, the obtained results are stable and acceptable under the highly unpredicted climate scenarios. The ANN relationships developed can be used to predict the future paddy yields in corresponding areas with the future climate data from various climate models.

1. Introduction

Rice is the staple food of almost all Sri Lankans. Therefore, it is estimated that 2.7 million metric tons of rough rice (paddy) is produced annually to satisfy the demand (around 95%) of the country [1]. More than 1.8 million farmers and farming families involve in this production. Therefore, it is important none other than any other agricultural products in Sri Lanka. However, paddy, as a crop, is one of the most affected cultivations in many countries due to the on-going climate variability [2, 3]. This is mainly because of the water requirement for the paddy cultivation.

With increasing global temperatures, resulting deviations in rainfall patterns cause immense impact on the crop growth. Thus, the water availability for crops essentially depends upon rainfall distribution. Moreover, intense and excess rainfall can produce adverse effects, along with major flooding devastating vegetation, while crop yield also reduces due to water shortage in drought climates. Nevertheless, rice cultivation is considered a semiaquatic plant grown at a controlled supply of water. The source of water supply and degree of flooding are treated to be some environmental factors which determine the paddy harvest.

Paddy cultivation in Sri Lanka takes place under different geographical and hydrological conditions with different soils and elevations. Cascade-type (Helmalu method in local language) cultivation can be seen in the central hill areas, whereas plain cultivation type can be seen in other areas. However, paddy is not the best for higher elevations such as 1500 m MSL in Sri Lanka [4]. Nevertheless, extreme weather events not only in Sri Lanka [5] but also in many other countries have increased over the last decade and have created uncertainty in rice production [68].

Therefore, many researchers investigated the relationships between the various climatic factors to not only paddy but also to various other crops [913]. Therefore, crop models and decision tools have become a crucial element of precision agriculture in the world as a result of rapid development of advanced technologies [14]. Linear regression techniques, nonlinear simulations, expert systems, Adaptive Neurofuzzy Interference System (ANFIS), Support Vector Machines (SVM), Data Mining (DM), Genetic Programming (GP), and Artificial Neural Network (ANN) are some of the prediction methods which are used in harvest predictions under the climate change [6, 1518]. Among these methods, ANN is treated to be a good solution for most of the complex problems. They resolve complex relations between crop production and interrelated parameters which cannot be solved using linear systems. ANNs are computer programs which mimic the process of human brains [15]. These programs learn to perform by analyzing own examples for a specific problem. Therefore, training a neural network to a particular problem is highly important. However, when it is correctly trained, neural networks can be easily used to predict the relationships even at higher number of variables.

Weather and climatic factors, such as rainfall, temperature, humidity, and sunshine hours, and soil factors, such as pH, texture, and organic matter content of soil are few of the many factors affecting the crop production [14]. Therefore, the literature shows many studies which use ANN in determining the relationship between climatic factors and paddy harvest all around the world [1922]. ANN was used not only to understand the climatic factors but also to classify the rice grains [23]. However, not many studies, based on ANN, were found in Sri Lanka in the context of paddy harvest. Napagoda and Tilakaratne [24] have carried out an ANN approach to determine the soil temperature, which is useful for the agriculture in Bathalagoda area in Sri Lanka.

However, according to the authors’ knowledge, no research has been carried out in determining the paddy harvest (yield) with respect to the various climatic factors in the context of Sri Lanka. Therefore, the objective of this paper is to understand the relationships among climatic factors and rice production in Sri Lanka. Three algorithms were used and compared in the development of the training process of ANN which predicts the paddy yield with respect to the various climatic factors. The authors of this paper believe that this would be the first study in the context of Sri Lanka to incorporate the ANN to paddy yield.

2. Various Algorithms in the Literature

As it was stated earlier, usage of ANN was frequent in many nonlinear real-world problems. ANN required three layers in minimum for its development; input layer, hidden layer, and output layer (refer Figure 1). The knowledge is acquired by detecting relationships in data through neural network. The first layer receives the raw data, which is processed and transferred to the hidden layer. Then, the information is passed from the hidden layer to the last layer where the output is produced [15].

The literature shows many algorithms are used in ANN to optimize the training process. Among them, Levenberg–Marquardt (LM), Bayesian Regularization (BR), and Scaled Conjugated Gradient (SCG) are three frequently used algorithms in ANN [2528].

2.1. Levenberg–Marquardt (LM) Algorithm

Gradient descent method and Gauss–Newton method are combined in this algorithm. When the Gauss–Newton method is used to express the backpropagation of neural network, the algorithm has a higher probability to reach an optimal solution [29]. In addition, the LM algorithm has faster convergence in backpropagation and therefore, widely used [30]. The Hessian calculation approximation () and gradient calculation () in LM algorithm are shown in equations (1) and (2), respectively:where and are Jacobian matrix and the vector of network error, respectively. In addition, the LM algorithm behaves as Newton’s method and is expressed asWhere , and are new weight calculated as gradient function, the current weight using Newton algorithm, and constant and identity matrix, respectively. More information of LM algorithm can be found in Ramadasan et al. [31].

2.2. Bayesian Regularization Algorithm (BR)

Similar to LM algorithm, Bayesian Regularization (BR) algorithm updates the learning algorithm’s weights and bias values and minimizes the linear combination of squared errors and weights. In addition, BR algorithm modifies the linear combination, and as a result, the network has good generalization qualities by the end of the training. LM and BR algorithms are considered to have the ability to obtain lower mean squared errors compared to other algorithms for functioning approximation problems [30]. More information on the BR algorithm can be found in Bueden and Winkler (2008).

2.3. Scaled Conjugated Gradient Algorithm (SCG)

Scaled Conjugate Gradient (SCG) is considered the most popular iteration algorithm used in solving problems of large systems of linear equations [29]. The equation of the conjugate gradient is as follows:where is the iteration index, is the step length at iterations, and is the search direction. SCG is a second derivative of Conjugate Gradient Algorithm, which has the ability to minimize the purpose function on several variables, and it uses step-size scaling techniques to avoid time consumed for learning iteration [29]. More information on SCG algorithm can be found in [32].

3. Methodology

MATLAB numerical computing environment (version was used to develop the ANN architectures to predict the paddy yield. One hidden layer was included in the ANN architecture with the dependent variable of the paddy yield. The climatic parameters were included as the input parameters of the ANN model.

Time series data for each input and output parameter were divided into three clusters: for training (70%), for validation (15%), and for testing (15%) of all data. The training step was started with selection of the training algorithms. The above stated three training algorithms, namely; Levenberg–Marquardt, Bayesian Regularization, and Scaled Conjugate Gradient were used. The performance of each training algorithm was evaluated based on the value of mean squared error ( and coefficient of correlation (R). Lowering the values and bringing near the R values to 1 give better predictions compared to the observed parameters [33]. Mathematical expressions for R and are given in equations (5) and (6):where , , and are the observed value, the predicted value, and the number of observations, respectively.

Coefficient of correlation and values were found for all cases in ANN under the three algorithms in developing the relationship between paddy yield and climatic factors. Equation (7) presents the mathematical expression for the nonlinear relationship which was modelled herein:where is the nonlinear function in between the paddy yield and climatic parameters. Depending on the data availability, the above relationship can be formulated in regional basis for harvesting seasons.

4. Case Study

Sri Lanka is located in the Indian Ocean and lies between the latitudes of 5°55 N and 9°51 N and the longitudes of 79°41 E and 81°53 E. It covers a land area of 65,610 km2. Sri Lanka is divided into nine provinces and twenty-five districts for administrative purposes. Eight districts were chosen for this analysis based on the data availability. More importantly, these eight districts are the major paddy grown districts in Sri Lanka. These districts are, namely, Ampara, Batticaloa, Badulla, Hambantota, Kurunegala, Puttalam, Trincomalee, and Vavuniya (refer Figure 2).

Sri Lanka has tropical climate conditions. The average annual temperature varies from 28°C to 30°C and annual average diurnal temperature variability ranges from 4°C to 7°C. Sri Lanka is under two major monsoon winds, and they bring significant amount of rainfall to the whole country. The two major monsoons are southwest monsoon (May to September) and northeast monsoon (December to February). In addition to these, there are two intermonsoons; 1st intermonsoon (March and April) and 2nd intermonsoon (October and November). Therefore, the country is rich in its receiving rainfall. However, not only the temporal variations but also the spatial variations affect the receiving rainfall. Therefore, the annual rainfall ranges from 600 mm in the arid areas to 6,000 mm in the very wet areas [4].

These rainfall patterns were used in developing two agricultural seasons in the country: Maha season and Yala season. The major agricultural season is the Maha season, and it spans from the September to March of the following year, whereas the Yala season spans from May to August. The Maha season dominates with rain-fed agriculture; however, irrigated water from tanks dominates in the Yala season for the water requirement of the paddy fields.

Rainfall (mm), morning and evening relative humidity (%), minimum and maximum temperature (°C), wind speed (km/hr), evaporation (mm), and sunshine hours (hr) are used as the climatic factors to predict the paddy yield. However, several climatic combinations for different time spans were used for each district. This is because of the nonavailability of some of the data. Table 1 summarizes the used climatic data for different districts.

The monthly climatic data were obtained from the Department of Meteorology and Department of Census and Statistics, Sri Lanka. The corresponding paddy yield data for two seasons (Yala and Maha) from rain-fed agriculture were obtained from the Department of Census and Statistics, Sri Lanka.

Depending on the data availability, neural networks were run to various climate combinations to obtain the relationships given in equation (7). In the absence of data for most of the years, combination of Maha and Yala seasons’ yield to the climate relationships were obtained. Equations (8) and (9) present these modified relationships between paddy yield and the climatic parameters:

Equation (8) was used to model the paddy yield in the Ampara, Batticaloa, Hambantota, Trincomalee, Badulla, and Vavuniya districts while equation (9) was used in the Puttalam and Kurunegala districts. As it was stated above, the neural network analysis were run under the three (LM, BR, and SCG) training algorithms.

5. Results and Discussion

Figures 3(a)3(i) show the coefficient of correlation for the Badulla district for annual (combination of Yala and Maha as two data points) paddy yield under the LM, BR, and SCG training algorithms. It can be clearly observed herein that the ANN under LM training algorithm has produced acceptable prediction to the paddy yield. Coefficient of correlation values are closer to 1 in all four cases (training, validation, test, and all, refer Figures 3(a)3(d)).

In addition, computational efficiency in the process is shown in Figure 3(e). The trained neural network under LM training algorithm converged to the best results in 2 epochs. Therefore, it has a higher computational efficiency.

Furthermore, Figures 3(f)3(i) exhibit the coefficients of correlation obtained for combination of Maha and Yala paddy yield under the BR (refer Figures 3(f) and 3(g)) and SCG (refer Figures 3(h) and 3(i)) algorithms. The coefficients of correlation are much lower than for the results under LM training algorithm (R=0.85043 and R=0.94523 for training and validation under LM algorithm). Therefore, it can be clearly seen herein that LM training algorithm outperforms the BR and SCG algorithms. This is well observed in many other related studies in comparing LM algorithm to other training algorithms [3438].

Figure 4 presents the correlation coefficients for the seasonal yield in Badulla and Kurunegala districts under the LM training algorithm. It can be clearly seen that the coefficient of correlation reaches almost to 1 in the absence of data. Figures 4(b) and 4(d) clearly showcased this finding. The R values in these two cases are 1, not because it is 100% match; however, the lines have only two data points where a straight line is directly predicted as the trend line which goes through the data points. Therefore, the ANN model is not functioned well under data scarcity. This clearly justifies the analysis in the annual resolution combining both seasons as two datasets.

It would be interesting to investigate the results from the relationship given in equation (9). As it was stated earlier, the analysis was carried out to two districts in Sri Lanka. Figures 4(e)4(h) show the coefficients of correlation for the Maha season under the LM algorithm for Kurunegala district. Similar observations discussed under the relationships given in equation (8) (please refer Figures 4(a)4(d)) can be observed in here. Results show that the LM algorithm outperforms the other two training algorithms. In the absence of many data, Figure 4 overall suggests researchers to use combination of Maha and Yala seasonal yield as a common dataset. This is acceptable since the yield used here is only based on the rain-fed agriculture in Maha and Yala seasons. The yield due to the irrigated agriculture was not considered for this analysis.

Table 2 summaries the correlation coefficients depicting the performance of the ANN trained to determine the relationships between climatic factors and rice production (refer equations (8) and (9)) using three different training algorithms (LM, BR, and SCG). These results are given for the combined Maha and Yala seasons in the absence of important climatic data. In terms of correlation coefficients, LM training algorithm has performed better compared to other two training algorithms. However, other algorithms also performed fairly well with acceptable R values in determining the relationship between climatic factors and rice production. In addition, the tabulated R values show that the results are improved at an increased number of data points.

Table 3 showcases the validation performances of the three training algorithms used for determination of relationship between climatic factors and rice production. All three training algorithms have performed well in terms of validation performance with lower mean square error values. However, with reference to the number of epochs and computational time, LM and SCG have performed well with less epoch numbers and computational time. It can be observed from Table 3 that BR training algorithm has larger number of epochs. Therefore, it can be concluded that LM training algorithm has performed well in determining the relationship between climatic factors and rice production with closer to “0” in less number of epochs and good correlation coefficients.

The results clearly show that paddy production has a strong correlation with climatic factors. However, in the absence of some of the climatic data, the combination of two cultivation seasons has produced improved results. Therefore, these results are stable.

As it was stated in Section 1, artificial neural networks were extensively used by many researchers to predict the paddy harvest/yield; however, it was not implemented to the Sri Lanka. Ji et al. [39] have carried out prediction models using neural network to predict the paddy harvest in Fujian province in China. The analysis was important as the province is often prone for natural disasters based on the climate. Their prediction models were within an acceptable range (R20.5 to 0.6). Hossain et al. [40] presented an artificial neural network-based prediction model to analyze the paddy harvest in Bangladesh. They have highlighted the necessity of such study to Bangladesh with on-going climate change. They were successful in predicting paddy harvest to Bangladesh with an error threshold. A similar study with more variables was carried out by Islam et al. [41]. They have considered many variables including maximum and minimum temperature, average rainfall, humidity, climate, weather, types of land, types of chemical fertilizer, types of soil, soil structure, soil composition, soil moisture, soil consistency, soil reaction, and soil texture; however, instead of particularly on paddy, they have analyzed total crop yield, but including paddy too.

However, Das et al. [42] have used several models, including liner, neural network, and penalized regression models to predict the rice yield in west coast of India. One important common conclusion was found from all above cited references; there is always an error threshold in the prediction as the prediction is based on the climate data. The same finding can be seen in many other related studies [43, 44]. In addition to the changing climate, spatial distribution of climatic data and the quality of the climatic data can trigger the error. However, with all the effort, it is still in the acceptable region for the prediction. Farmers would not be interested in predicting their harvest to the best possible; however, they would be happy to accept a reasonable level prediction. Interestingly, the research carried out to some parts of Sri Lanka is the same. The prediction is stable; however, the coefficient of correlation is around 0.6–0.8. Therefore, a similar error threshold is there in the prediction. Therefore, more research should be carried out for the higher accuracy prediction model, while keeping the developed model as a baseline.

6. Conclusions

Nonlinear complex relationships among various climatic factors and paddy yield were obtained for several districts in Sri Lanka using artificial neural networks. Comparative analysis using three different training algorithms shows that the LM training algorithm is better than other two BR and SCG algorithms. However, BR and SCG algorithms have also produced acceptable results. Therefore, LM algorithm can be used in future predictions at lower computational costs. The correlation coefficients from the tests were not the best for predictions as they are numerically around 0.65–0.8. However, as the literature suggests these correlation coefficients are acceptable in the context of highly varying climate scenarios. Therefore, it can be concluded herein that there is an acceptable correlation in between the paddy yield and the climatic factors. Thus, it can be concluded that the paddy yield is significantly impacted due to on-going climate change.

More importantly, these nonlinear relationships are available with the analysis. Therefore, reverse calculations are possible in the presence of future climate data. Various climate models can be used to extract future climate data, and therefore, the ANN models can be rerun to obtain the corresponding paddy yield data. Therefore, this prediction would be highly important to the planners and authorities to arrange sustainable cultivation patterns in the future. However, as discussed, the predictions are obtained with an error threshold due to unpredicted climate variables, spatial nonuniformity of climatic data, and the quality of the recorded data. Nevertheless, the planners and farmers are not expecting perfect predictions, but acceptable predictions.

In addition, in extreme climate events, the models can be used to prepare the proper schedules for food sustainability. Nevertheless, the models have to be further improved using more climatic parameters. In addition, it would be interesting to investigate the relationships among other important variables such as technological improvements in agriculture and new crop varieties, which can withstand some climate extremes and various negative impacts from various pests in paddy cultivation.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.


The research was carried out in the Sri Lanka Institute of Information Technology and Wayamba University of Sri Lanka environments.

Conflicts of Interest

The authors declare that they have no conflicts of interest.


Authors are grateful to Sri Lanka Institute of Information Technology, Sri Lanka for providing financial support to carry out this research. In addition, the authors would like acknowledge the support that they have received from Department of Census and Statistics, Sri Lanka and Department of Irrigation, Sri Lanka to conduct this research work. Furthermore, the contribution received from Wayamba University of Sri Lanka is notable.