Skip to main content

Advertisement

Log in

Demand prediction of rice growth stage-wise irrigation water requirement and fertilizer using Bayesian genetic algorithm and random forest for yield enhancement

  • Article
  • Published:
Paddy and Water Environment Aims and scope Submit manuscript

Abstract

Rice cultivation is the major source of earning revenues worldwide. The productivity and yield of rice crops mainly depend on soil water balance and soil fertility. Irrigation water requirement (IWR) analysis helps to retain appropriate soil water balance and judiciously allocate water resources considering vegetative, reproductive, and ripening stages of rice growth. To restore fertility, the application of fertilizers is inevitable but most of these are squandered owing to improper fertilizer selection without evaluation of soil macro-nutrients. So, the enhancement of rice yield demands the well-balanced application of fertilizers along with specific IWR analysis in each growth stage. In this paper, eXtreme Gradient Boosting (XGBoost) is used to extract high-scoring, correlated environmental parameters with IWR. Stacking-based ensemble learning is used to predict evapotranspiration since it is a very crucial indicator of rice water demand in different growth stages. Based on selected features of XGBoost and predicted evapotranspiration, IWR specific to all the rice growth stages is predicted using the Bayesian genetic algorithm (\(Bay_{GA}\)) hyper-tuned random forest (RF). The parameters of the maximum and the minimum number of samples required to be at the leaf node of RF are hyper-tuned using \(Bay_{GA}\) to optimize performance. Comparative results indicate that IWR prediction using \(Bay_{GA}-RF\) outperforms other methods with Accuracy (86.12, 92.42, 91.24), MSE (0.182, 0.162, 0.196), RMSE (0.426, 0.402, 0.442), MAE (0.193, 0.174, 0.205) and NSE (0.911, 0.952, 0.944) in Vegetative, Reproductive and Ripening rice growth stages and accuracy of \(98\%\) to predict suitable fertilizer depending on Nitrogen, Phosphorous, and Potassium soil macro-nutrients.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Data availability

Data will be made available on request.

Code availability

No codes are made available for sharing at present.

References

Download references

Acknowledgements

None of the Authors received any financial support from any funding agency to carry out this research work. Computing Infrastructure of Tripura Institute of Technology, Agartala as well as National Institute of Technology, Agartala was used to prepare this research article.

Funding

The authors did not receive support from any organization for the submitted work.

Author information

Authors and Affiliations

Authors

Contributions

Conceptualization:- PM and SM Formal Analysis:- PM and BB Investigation and Methodology:- SM and PM Data Curation and Software:- PM and DB Validation:- SM and RS Visualization:- RS,DO and BB Writing—Original Draft:- PM, SM and DB Writing - Review and Editing:- SM, RS and DO Supervision:- DB and SM

Corresponding author

Correspondence to Sanjoy Mitra.

Ethics declarations

Competing interest

The authors have no competing interests to declare that are relevant to the content of this article. All authors certify that they have no affiliations with or involvement in any organization or entity with any financial interest or non-financial interest in the subject matter or materials discussed in this manuscript.

Ethical approval

This Research does not involve Human Participants and/or Animals. Hence ethics approval not required.

Consent to participate

As this research does not involve Human Participants and/or Animals, hence, Consent to participate not applicable.

Consent to Publish

As this research does not involve Human Participants and/or Animals, hence, Consent to publish not applicable.

Appendix 1: EXtreme Gradient Boosting

Appendix 1: EXtreme Gradient Boosting

In eXtreme Gradient Boosting (XGBoost), the training data \(a_{i}\) has been trained to predict a target variable \(b_{i}\) and an ensemble of K Classification and Regression Trees. T1 (\(a_{i}\), \(b_{i}\))...TN (\(a_{i}\), \(b_{i}\)) where \(a_{i}\) is the descriptor’s training set. To acquire the overall prediction, the XGBoost ensemble incorporates a gradient descent approach to minimize loss and evaluate the errors of the previous model.

The data d(\(a_{i}\), \(b_{i}\)): i = \(1 \rightarrow n\) with s sample of f features, while \(b_{i}\) is the predicted value expressed as:

$$\begin{aligned} b_{i}^{'}= \sum _{j=1}^{J} f_{j}(a_{i}), f_{j} \in N \end{aligned}$$
(20)

here \(f_{j}\) is the regression tree, and \(f_{j}(a)\) is the prediction score of the jth tree to the data sample. \(N =f(a)=W_{p(a)}\) (p: \({\mathbb {R}}^{m}\) to T, \(W \in {{\mathbb {R}}}^{T}\) ), the space of regression tree, where W is the leaf weight and p is the tree mapping structure to its leaf index. T is the number of leaf nodes in the tree. Learning the function \(f_{j}\) is based on minimizing the objective function,

$$\begin{aligned} \phi = \sum _{i=1}^{n} l(b_{i}, b_{i}^{'}) + \sum _{j=1}^{J} \Omega (f_{k}) \end{aligned}$$
(21)

where l is the training loss and the regularization term \(\Omega\) penalizes model complexity. The optimal weight of the leaf can be represented as:

$$\begin{aligned} \Omega (f_{j}) = \lambda _{1}T + \frac{1}{2\lambda _{2}} \vert \vert w_{t} \vert \vert ^{2} \end{aligned}$$
(22)

where \(\lambda _{1}\) and \(\lambda _{2}\) are the regularization degrees. T and \(w_{t}\) are the leaf nodes and score. Considering \(b_{i}^{'}(t)\) is predicted at t iteration, \(f_{t}\) is added to minimize the objective,

$$\begin{aligned} \phi ^{t} = \sum _{i=1}^{n} l (b, b^{'(t-1)} + f_{t}(b)) + \Omega (f_{t}) \end{aligned}$$
(23)

The first and the second-order gradient on l are \(\delta _{b^{'}(t-1)} l(b,b^{'(t-1)})\) and \(\delta ^{2}_{b^{'}(t-1)} l(b,b^{'(t-1)})\) denoted by \(g_{i}\) and \(h_{i}\). Thus, using the second-order Taylor expansion, the above equation can be rewritten as:

$$\begin{aligned} \phi ^{t} = \sum _{i=1}^{n} [g_{i}f_{t}(a) = \frac{1}{2}h_{i}f_{t}(a^{2})] + \Omega (f_{t}) \end{aligned}$$
(24)

where \(g_{i}\) and \(h_{i}\) is the second-order gradient on l. It can be defined as \(I_{k}\)=\(f_{i} \vert p(a_{i})=k\) which is the instance of leaf k. Thus, the above equation can be written as:

$$\begin{aligned} \phi (t)= & {} \sum _{i=1}^{n} [g_{i}f_{t}(a) = \frac{1}{2}h_{i}f_{t}(a^{2})] + \lambda _{1} T + \frac{1}{2} \lambda _{2} \sum _{k=1}^{T} w_{k}^{2} \end{aligned}$$
(25)
$$\begin{aligned} \phi (t)= & {} \sum _{k=1}^{T} [(\sum _{i \in I_{k}}g_{i})w_{k} + \frac{1}{2} (\sum _{i \in I_{k}} h_{i} + \lambda _{1})w_{k}^{2}] + \lambda _{2} T \end{aligned}$$
(26)

The optimal weight, \(w^{*}_{k}\) of leaf k on a fixed structure q(a) is expressed as:

$$\begin{aligned} w^{*}_{k}= - \frac{G_{k}}{H_{k} + \lambda _{2}} \end{aligned}$$
(27)

whose values can be expressed as:

$$\begin{aligned} \phi ^{*}= - \frac{1}{2} \sum _{k=1}^{T} \frac{G_{k}^{2}}{H_{k} + \lambda _{2}} + \lambda _{2}T \end{aligned}$$
(28)

where \(G_{k}=\sum _{i \in I_{k}} g_{i}\), \(H_{k}= \sum _{i \in I_{k}} h_{i}\) and \(\Phi\) is the scoring function for the tree structure where smaller value indicates better tree structure. Both the gradient and second-order gradient statistics on each leaf needs to be added to get the overall reliable score before implementing the scoring algorithm.

The optimal split finding algorithm, as well as the loss reduction are similar to the ideas in Chen and Guestrin (2016b).

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Majumdar, P., Bhattacharya, D., Mitra, S. et al. Demand prediction of rice growth stage-wise irrigation water requirement and fertilizer using Bayesian genetic algorithm and random forest for yield enhancement. Paddy Water Environ 21, 275–293 (2023). https://doi.org/10.1007/s10333-023-00930-0

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10333-023-00930-0

Keywords

Navigation