## 4 Model Training and Evaluation Methods
### Determination of Optimum Hyperparameters of Models with Grid Search  
Another method used to improve model performance is grid search. Grid search aims to select the optimal combination according to the evaluation metric by performing a systematic search in the ranges of the hyperparameters defined for each model. During the optimization process, the performance of each model was evaluated via cross-validation, and the hyperparameters with the lowest error values were determined. The hyperparameters selected by the grid search method can be seen in Table 7.  
The evaluation metrics results of the models after hyperparameter optimization with the grid search method are given in Table 8. \begin{table}
\begin{tabular}{l l} \hline \hline
**ML Models** & **Hyperparameters and Values** \\ \hline \multirow{2}{*}{DT} & criterion = poisson, max\_depth = 12, max\_leaf\_nodes = 152, \\  & min\_samples\_leaf = 8, random\_state = 42 \\ \hline \multirow{2}{*}{RF} & n\_estimators = 300, criterion = poisson, max\_depth = 20, \\  & min\_samples\_leaf = 2, random\_state = 42 \\ \hline \multirow{2}{*}{K-NNs} & n\_neighbors = 15, weights = distance, metric = manhattan, leaf\_size = 10 \\ \hline \multirow{2}{*}{AdaBoost} & n\_estimators = 1500, learning\_rate = 1.0, loss = square, random\_state = 42 \\ \hline \multirow{2}{*}{GBM} & n\_estimators = 300, learning\_rate = 0.05, max\_depth = 3, objective = huber, \\  & random\_state = 42 \\ \hline \multirow{2}{*}{ETR} & n\_estimators = 600, min\_samples\_leaf = 2, min\_samples\_split = 6, \\  & criterion = friedman\_mse, random\_state = 42, n\_jobs = \(-1\) \\ \hline \multirow{2}{*}{BR} & n\_estimators = 300, max\_samples = 0.6, max\_features = 1, bootstrap = True, \\  & bootstrap\_features = False, random\_state = 42 \\ \hline \multirow{2}{*}{SVR} & kernel = rbf, C = 10, epsilon = 0.01, degree = 3 \\ \hline \multirow{2}{*}{HGBR} & learning\_rate = 0.1, loss = squared\_error, max\_depth = 3, \\  & min\_samples\_leaf = 10, random\_state = 42 \\ \hline \multirow{2}{*}{XGBoost} & n\_estimators = 300, learning\_rate = 0.05, max\_depth = 3, c = 10, \\  & random\_state = 42, n\_jobs = \(-1\) \\ \hline \hline \end{tabular}
\end{table} 
Table 7: The hyperparameters selected by the grid search method. According to the metric results obtained after hyperparameter estimation using the grid search method, the models with the highest R\({}^{2}\) values are the SVR, XGBoost, and GBM models, with values of 0.9519, 0.9474, and 0.9469, respectively. These models successfully explained most of the variance in the data set. The lowest R\({}^{2}\) value was observed in the Bagging Regressor model, with a value of 0.1432, indicating that the model had difficulty in capturing the patterns in the data. The lowest MSE and RMSE values belong to the SVR (0.0398, 0.1994), XGBoost (0.0435, 0.2085) and GBM (0.0438, 0.2094) models respectively. This suggests that these models work with both small errors and consistent forecasts. The highest error values were again observed in the BR model (MSE = 0.7085, RMSE = 0.8417), indicating that the generalization capacity of the model is weak. In terms of MAE, the SVR (0.1594), XGBoost (0.1638), and GBM (0.1645) models again stood out, while the BR model (0.7067) exhibited low accuracy with high bias. A similar ranking was observed in terms of MSLE and MedAE metrics, with the XGBoost and SVR models dominating as to the MSLE and MedAE values. MaxEr and erMAX were the highest in the BR model, at 1.998 and 176.93, respectively, indicating that the model is highly sensitive to extreme values. In contrast, SVR and XGBoost provided more stable forecasts with relatively low values in these metrics. When the MARE, MSRE, RMSRE, and RRMSE results are analyzed, it can be understood that the SVR, XGBoost and GBM models offer more robust and balanced forecasting performance with low rates of error. The BR model showed significant relative bias, especially in the MSRE (142.01) and RMSRE (11.92) values.