# Machine Learning Technologies in the Supply Chain Management Research of Biodiesel: A Review
## 3 Machine Learning in Supply Chain Management of Biodiesel
### Machine Learning Algorithms for Feedback Yield Estimation
Unlike the RF algorithm shown in Figure 2, the ANN model consists of multiple layers, and Equation (4) represents the \(n\)th output at layer \(L\) (\(a_{n}^{1}\)) in ANN:  
\[a_{n}^{L}=\left[\sigma\left(\sum_{m}\theta_{mm}^{L}\left[\cdots\left[\sigma \left(\sum_{j}\theta_{kj}^{2}\left[\sigma\left(\sum_{i}\theta_{ji}^{1}x_{i}+b_{j} ^{1}\right)\right]+b_{k}^{2}\right)\right]\cdots\right]_{m}+b_{n}^{L}\right) \right]_{n} \tag{4}\]  
where \(b_{n}^{l}\) is the bias with \(n\) nodes at \(l\) layer; \(\theta_{mm}^{l}\) is a weight between \(l\) and \((l-1)\) layers; and \(x_{i}\) is an input node \(l\)[58]. The Python scikit-learn version 0.23.2 was used to conduct the \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Independent Variables** & **Nov.** & **Dec.** & **Jan.** & **Feb.** & **Mar.** & **Dependent Variable** \\ \hline Temperature & T1 & T2 & T3 & T4 & T5 & \\ Precipitation & P1 & P2 & P3 & P4 & P5 & \\ (P, mm) & PET1 & PET2 & PET3 & PET4 & PET5 & \\ Crop evapotranspiration & CET1 & PET2 & PET3 & PET4 & PET5 & \\ Real crop evapotranspiration & AET1 & AET2 & AET3 & AET4 & AET5 & Annual average yield data \\ (AET, mm) & AET1 & AET2 & AET3 & AET4 & PET5 & Annual average yield data \\ Storage & STO1 & STO2 & STO3 & STO4 & STO5 & \\ (STO, mm) & DEF1 & DEF2 & DEF3 & DEF4 & DEF5 & \\ Deficit & DEF1 & DEF2 & DEF3 & DEF4 & DEF5 & \\ (DEF, mm) & EXC1 & EXC2 & EXC3 & EXC4 & EXC5 & \\ Phases & Sowing \& Vegetative & Flowering & Frutification & Maturation & Harvest \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Data structure [57]. Figure 2: Overall procedure of random forest (RF). machine learning, and hyperparameters such as a rectified linear unit function, an optimization solver weight using the Quasi-Newton method, a learning rate, an alpha penalty parameter, the number of interactions, and the number of neurons in each layer were defined to identify the optimum structure of ANN in terms of estimation accuracy [57]. Three different measures were utilized to evaluate the estimation accuracy, and Equations (5)-(7) illustrate the root mean square error (\(RMSE\)), coefficient of determination (\(R^{2}\)), and mean estimation error (\(ME\)), respectively. \[RMSE=\sqrt{\sum_{i=1}^{N}(y_{i}-\hat{y}_{i})^{2}/N} \tag{5}\]  
\[R^{2}=\sum_{i=1}^{N}(\hat{y}_{i}-\overline{y}_{i})^{2}/\sum_{i=1}^{N}(y_{i}- \overline{y}_{i})^{2} \tag{6}\]  
\[ME=\sum_{i=1}^{N}(y_{i}-\hat{y}_{i})^{2}/N \tag{7}\]  
where \(y_{i}\) is the observed data; \(\hat{y}_{i}\) is the estimated data; \(\overline{y}_{i}\) is the mean of the observed data; and \(N\) is the total number of estimated data. The three measures were used in the \(k\)-fold cross-validation (CV) test, which divides a test dataset into smaller \(k\) sets for performance evaluation of a machine learning algorithm in the Scikit-Learn library. This model validation process was also applied to the SVM modeling illustrated in Equation (8). \[f(\mathrm{x})=\mathrm{w}^{T}\phi(\mathrm{x})+b \tag{8}\]  
where \(\mathrm{x}\in R^{L}\) is a vector of \(L\) input features; \(\phi:\mathrm{x}\rightarrow\phi(\mathrm{x})\in R^{H}\) is any nonlinear function mapping the input data into a high-dimensional feature space with \(H\geq L\); \(\mathrm{w}\) is a weight vector; and \(b\) is the hyperplane bias. To estimate an appropriate weight vector, a kernel function (\(K(\mathrm{x},\mathrm{x}^{\prime})=\phi(\mathrm{x})\cdot\phi(\mathrm{x}^{ \prime})\)), such as radial basis function kernel, linear kernel, and polynomial kernel, can be used [56]. Equation (9) represents the radial basis function (RBF) kernel which is known as the squared Euclidean distance between two feature vectors such as \(\mathrm{x}\) and \(\mathrm{x}^{\prime}\). Equation (10) represents the linear kernel which is used when the observed data are linearly separable. Equation (11) represents a polynomial kernel with the degree of polynomials (\(d\)), and it is used when the observed data can be explained by a polynomial combination of existing features.