## 2 Materials and Methods
### Machine Learning Implementations
#### 2.5.4 Hybrid Model Building  
For the earlier generations, the following four hybrid combinations were used: RF-XGB, RF-SVR, XGB-SVR, and RF-XGB-SVR. By using hybrid models, the results were expected to be more accurate and the inaccuracy in calculating the sugarcane crop's green water footprint was to be minimized. It was carried out with the earlier hybrid method.  
A hybrid approach involving random forest (RF) and extreme gradient boosting (XGB), known as RF-XGB, has been implemented to enhance tree-based algorithms for predictive modelling. In the context of decision trees, weak learners are typically shallow trees, sometimes as small as decision stumps (trees with two leaves). Boosting continuously updates the weights of the training set based on previous weaker learners to improve the importance of misclassified data. The function within XGB aims to enhance the majority vote value in RF while also aiding in the formation of individual trees within the bagging process of RF. The RF-XGB hybrid improves the RF model by reducing errors in MBE, MSE, and MAE values, consequently increasing model accuracy. This improvement is crucial as RF often struggles with overfitting due to challenges in determining the optimal number of trees [53].  
The suggested approach used a meta-heuristic methodology to train the membership function parameters and layer weights of the basic RF model in an effort to increase the model's efficiency for GWFP simulation. The suggested approach combined an SVR with an RF to create a hybrid RF-SVR model, in which the SVR was used to optimize the RF settings. It is necessary to perform the optimization in the new n-dimensional space (RF-SVR) before using the SVR for training of RF weight updates. Under this configuration, the RF is viewed as a whale in a d-dimensional space, where d is the sum of the weights and the bias of the RF, varying the local and global optima of the search. Weights are assigned at random throughout the weight optimization procedure. If the difference between the output of the support vector regression and the output related to the real inputs is less than a certain limit, the initial weights are then adjusted and modified in each repeat. Every hybrid model with two algorithm models underwent the same processes.  
XGB, SVR, and RF are combined in the hybrid model. The hybrid model is divided into three sections. The first component selects and pre-processes the data, ranking the relevance of each variable using the random forest method. The RF model's input data are then chosen according to the variable's relevance. Because the input variables in the model had varying dimensions, normalizing them was important to improve computing efficiency, convergence accuracy, and estimation precision. Equation (16) was used to normalize the variables to do this [54].  
\[X^{\prime}=\frac{X-X_{\text{min}}}{X_{\text{max}}-X_{\text{min}}} \tag{16}\]  
where \(X_{\text{min}}\) and \(X_{\text{max}}\) are the minimum and maximum of all input variable values; \(X\) is the measured values of all the input variables; \(X^{\prime}\) is the normalized values of measured values. The model simulation is covered in the second section. It starts with the initialization of the XGB model's hyper-parameters, such as the regulatory coefficient (C) and the RBF parameters \(\mu\) and \(\varepsilon\). The model then estimates GWFP and computes the relevant error after defining the optimization accuracy requirement.  
The model moves on to the third section, which entails applying the SVR method to optimize the XGB model's hyper-parameters if the intended goal is not accomplished. The goal of optimizing the SVR model and raising the precision of the GWFP estimate is accomplished by returning the SVR hyper-parameters with the highest fitness.