## 4 Discussion
### LSTM
#### 4.3.2 Sensitivity
(**a**) interaction between CNT and Fe\({}_{3}\)O\({}_{4}\) at various concentrations; (**b**) interaction between MLG and Fe\({}_{3}\)O\({}_{4}\) at various concentrations; (**c**) interaction of MT with differing concentrations of Fe\({}_{3}\)O\({}_{4}\); (**d**) interaction between MLG and CNT at various concentrations; (**e**) interaction of MT with differing concentrations of CNT; and (**f**) interaction of MT with differing concentrations of MLG. where \(y_{2}\) denotes the sensor sensitivity performance response value; \(x_{1}\), \(x_{2}\), and \(x_{3}\) denote the content of Fe\({}_{3}\)O\({}_{4}\), CNT, and MLG, respectively; and \(x_{4}\) is the moulding temperature. RF  
Table 13 presents the outcomes of the sensitivity predictions utilising the RF model. The model's performance using the GridSearchCV approach diminishes progressively with a reduction in the number of decision trees. This is evident when comparing the three combinations with varying numbers of decision trees (200, 150, and 100), as the R\({}^{2}\) of the test set progressively declines from 0.8035 to 0.8018 to 0.7887. Conversely, altering the maximum depth does not yield a notable enhancement in performance. The parameter combinations exhibiting an identical maximum depth value of 100 yield comparable outcomes in the test set, with the R\({}^{2}\) approximately at 0.8. In the RandomizedSearchCV approach, varying the number of decision trees does not substantially enhance the model performance. The fluctuation in R\({}^{2}\) on the test set is minimal, spanning from 0.7969 to 0.8046. Furthermore, there was minimal variation in the model performance with the increase in the maximum depth. The configuration with a maximum depth of 259 and the fewest decision trees exhibited the highest R\({}^{2}\) (0.8046) on the test set. However, the configuration with a reduced maximum depth displayed slightly lower values. For all of the examined parameter combinations, the R\({}^{2}\) of the training set approaches 1. The research indicates that the model exhibits poor generalisation, likely because of overfitting; thus, further data samples may be necessary to enhance the model's predictive accuracy. LSTM  
Figure 16a illustrates that the R\({}^{2}\) value for the training set remains relatively stable with an increased number of hidden layers. Conversely, in the test data, the R\({}^{2}\) value reaches its zenith at three hidden layers before declining with further increases in the hidden layers, indicating that three hidden layers adequately encapsulate the data's complexity while mitigating the risk of overfitting. Consequently, the number of hidden layers was established at three, and the variation in R\({}^{2}\) concerning the amount of neurones in the hidden layers was then examined. Figure 16b illustrates that in the training data, R\({}^{2}\) remains rather stable. However, in the test data, the peak value is observed at 60 neurones per layer, yielding R\({}^{2}\) values of 0.9968 for the training data and 0.844 for the test data. Increasing the number of neurones leads to a decline in the model performance due to overfitting on the test data. \begin{table}
\begin{tabular}{c c c c c} \hline
**Search Techniques** & \begin{tabular}{c} **Number of** \\ **Estimators** \\ \end{tabular} & \begin{tabular}{c} **Maximum** \\ **Depth** \\ \end{tabular} & \
\begin{tabular}{c} **R\({}^{2}\) Train** \\ \end{tabular} &
\begin{tabular}{c} **R\({}^{2}\) Test** \\ \end{tabular} \\ \hline GridSearchCV & 200 & 100 & 1.000 & 0.8035 \\ GridSearchCV & 150 & 150 & 1.000 & 0.8018 \\  & 100 & 100 & 0.996 & 0.7887 \\  & 55 & 65 & 1.000 & 0.7985 \\ RandomizedSearchCV & 20 & 259 & 0.999 & 0.8046 \\  & 120 & 100 & 1.000 & 0.7969 \\ \hline \end{tabular}
\end{table} 
Table 13: R\({}^{2}\) values using various hyperparameters and search methodologies in forecasting sensitivity utilising RF.