## 2 Materials and Methods
### Proposed Modified Gradient Boosting Classifier  
The segmented images from the random walker method are used to train the proposed modified gradient boosting algorithm-based classifier. The basic building blocks of the proposed classifier are shown in Figure 2. In order to classify robustly, the weak learners must be converted to strong learners by ensemble learning [33, 34, 35]. Regular ensemble methods, such as random forest, depend on the straightforward voting of learners in the ensemble. The group of boosting strategies is based on an alternate, helpful technique of ensemble arrangement. The boosting algorithm identifies the weak learner and generates a new weak prediction rule from that learner. This algorithm involves an iteration process, such that for every iteration, the boosting algorithm makes the weak prediction rules into a single strong prediction rule. The gradient boosting algorithm is a machine learning technique that works well with ensemble methods. This algorithm is used to reduce the error rate by applying the gradient descent technique.  
The idea behind this technique is to create new base-learners that are maximally associated with the loss function's negative gradient, which is connected to the entire ensemble. The loss functions used can be arbitrary, but to give an intuition, if the error function is the typical squared-error loss, the learning technique will result in a series of error-fittings. Boosting algorithms are moderately easy to implement, which allows one to try different things with various model plans. The proposed modified gradient boosting algorithm used in the classifier model is explained in Algorithm 1.  
```
Begin Inputs  Dataset (\(x_{i}\) y)  Number of iterations, \(M\)  Loss Functions, \(L(y,F(x))\)  Choose the base-learner function, \(a_{m}\)  Initialize \(F_{0}(x)\) for\(m=1\) to \(M\) Compute the negative gradient function \(g_{m}(x_{i})\). Generate the new base-learner function \(h(x;a_{m})\). \(a_{m}=\operatorname*{argmin}_{a,b}\sum_{i=1}^{N}[g_{m}(x_{i})-\beta h(x_{i};a )]^{2}\), where \(h(x;a)\) is a weak learner Evaluate the best gradient descent step-size \(\rho_{m}\). \(\rho_{m}=\operatorname*{argmin}_{b}\sum_{i=1}^{N}L(y_{i},F_{m-1}(x_{i})+\rho h (x_{i}a_{m}))\) Update the estimation/prediction function \(F_{m}(x)=F_{m-1}(x)+_{m}h(x;a_{m})=y\) End for Output prediction, \(y\) End
```  
**Algorithm 1****Proposed Modified Gradient Boosting Algorithm**  
Let us suppose \((x_{i},y)\) to be the dataset, with \(x_{i}\) being the input parameters and \(y\) be the output parameter, which is a multi-class variable. The objective is to construct a functional reliance, \(F*(x)\), that maps from \(x\) to \(y\), which minimizes the specified loss function, \(L\) (\(y,F(x)\)).  
\[F^{*}(x)=\operatorname*{argmin}_{F}E_{y,\ x}L(y,\ F(x))=\operatorname*{argmin }_{F}E_{x}\big{[}E_{y}(L(y,\ F(x)))\big{|}\ x\big{]} \tag{12}\]  
The initial value is obtained by:  
\[\operatorname{F}_{0}(x)=\operatorname*{argmin}_{\rho}\sum_{j=1}^{N}L(y_{i},\ \rho) \tag{13}\]  
Figure 2: Basic building blocks of the proposed modified gradient boosting model.  
where \(\rho\) is step size.  
The negative gradient function is obtained by taking the derivative of the above function, and it is given as:  
\[g_{m}(x_{i})=-\left[\frac{\partial L(y_{i},F(x_{i}))}{\partial F(x_{i})}\right] _{F(x)=F_{m-1}(x)},\ i=1,...\ N \tag{14}\]  
In the end, at an estimator/prediction function is arrived at in order to classify the output class based on the input parameters.