# Machine-Learning-Based Path Loss Prediction
## 4 Results and Discussion  
In this study, V2V propagation analyses were performed in highway environments using ANN, RF, LR, GB, SVR, and AB machine-learning techniques and their performance was compared with the traditional log-distance, two-ray, and log-ray models. Various environmental and systemic features, such as weather, distance, number of antennas, antenna position, and direction of vehicle movement, have been used as input parameters in path loss prediction using machine learning. Processing these parameters with machine learning algorithms produced more accurate and faster predictions than using traditional methods. Moreover, the large dataset and diversity of parameter options in our study increased the reliability and generalizability of the model in real-world scenarios. The effectiveness of these machine learning models in estimating path loss is first shown in Figure 6. The expectation here is that the predicted values will align closely with the actual data line (y = x line), indicating the accuracy and reliability of the model. In this regard, the RF and GB models showed the highest accuracy by closely reflecting the distribution of the actual and predicted values with minimal deviations from the actual data line. This means that these models performed well and effectively captured general trends. Although the ANN model was successful in effectively capturing the nonlinear structure of the data, we believe that its sensitivity to extreme values reduces its overall accuracy. In general, the SVR model is known for its success in representing nonlinear relationships; however, in this problem, the error distance increased notably at high carrying capacities. On the other hand, the AB model, characterized by a more scattered distribution of its predictions, demonstrated lower accuracy, while the LR model had the highest error rate, failing to adequately represent nonlinear relationships. Consequently, the RF and GB models provided higher accuracy and reliability compared to the others, whereas the ANN and SVR models exhibited acceptable performance and the AB and LR models showed lower accuracy. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Model** & **Parameter** & **Range Tested** & **Optimized Value** \\ \hline \multirow{4}{*}{ANN} & Number of Layers & 1-3-5-7 & 3 \\  & Number of Neurons in Layer 1 & 0-10-50-100 & 10 \\  & Number of Neurons in Layer 2 & 0-10-50-100 & 10 \\  & Number of Neurons in Layer 3 & 0-10-50-100 & 10 \\  & Activation Function & ReLU, Sigmoid, Tanh & ReLU \\  & Number of Epochs & 500-1000-1500-2000 & 1500 \\ \hline \multirow{2}{*}{RF} & Minimum Leaf Size & 10-20-30-40-50 & 20 \\  & Surrogate Decision Splits & On, Off & On \\ \hline \multirow{2}{*}{LR} & Initial Terms & Linear, Quadratic & Linear \\  & Upper Bound on Terms & Interactions, Stepwise Linear & Interactions \\  & Maximum Number of Steps & 1000-2000-3000-4000-5000 & 2000 \\ \hline \multirow{2}{*}{GB} & n\_estimators & 50-100-200-300 & 200 \\  & Learning Rate & 0.001-0.01-0.1-1 & 0.01 \\  & Max Depth & 1-5-10 & 5 \\ \hline \multirow{2}{*}{SVR} & Kernel Function & RBF, Linear, Polynomial & RBF \\  & C (Regularization Parameter) & 0.1-0.5-1-5-10 & 0.5 \\  & Epsilon & 0.01-0.05-0.1-0.5 & 0.05 \\  & Kernel Scale & 0.1-1-5-10 & 1 \\ \hline \multirow{2}{*}{AB} & Base Estimator & Random Forest, Linear Regression & Random Forest \\  & n\_estimators & 50-100-150-200 & 100 \\  & Learning Rate & 0.01-0.1-0.5-1 & 0.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Hyperparameter optimization results for machine learning modelsThe numerical results for the performance comparison of the path loss prediction models are presented in Table 5 and Figure 7 with the metrics Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and Coefficient of Determination (R\({}^{2}\)). The first observation is that machine learning models dominantly have high accuracy according to the prediction performance of traditional empirical models.