# Machine-Learning-Based Path Loss Prediction
## 3 Materials and Methods
### Data Processing  
The measurement data obtained from the field studies were first grouped according to their characteristics. Then, they were used as input parameters that significantly impact path loss for machine learning. In this context, these different inputs were categorized \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Standard & IEEE 802.11p \\ Frequency band & 5.9 GHz \\ Data rate & 3–27 Mbps \\ Tx power & 22 dBm \\ Antenna gain & 5 dBi \\ Antenna heights & Vehicles = 1.46 m (Tx and Rx) \\ Rx sensitivity & \(-99\) dBm at 3 Mbps \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Technical specifications of the DSRC OBU device [49]. Figure 1: Measured highway routes and map views. Figure 3: Interior view of the transmitter and receiver vehicle and MK5 OBU Kit [49]. Figure 2: Measurement system block diagram. into two groups: environmental and systemic features. The path loss that represents the attenuation encountered by the signal between the Tx and the Rx was defined as an output parameter. This output was determined using learning algorithms, as depicted in Figure 4, and input parameters were considered in the estimation process. Weather conditions such as sunny and snowy are among the most important environmental factors in wireless communication, affecting how the signal propagates under atmospheric conditions. The study used weather conditions as an environmental input parameter due to their significant impact on attenuation. On the other hand, the distance between Tx and Rx vehicles, which is one of the most significant parameters affecting signal loss directly in empirical models, the number of antennas (one or two) that enable wireless communication between vehicles, the position of antennas (inside or outside the vehicle), and the direction of vehicles' movement (same or opposite) were defined as systemic input features. Table 3 summarizes the input feature encoding used in the machine learning models for this study to ensure uniformity in data processing and enhance the model's predictive accuracy. The one-hot encoding method was used for each category for the inputs in Table 3 to be processed by the machine learning models [50]. Nine independent input parameters and one dependent output parameter (path loss) were selected from 192,000 observations measured in this study. All simulations and analyses were performed using MATLAB R2023a, with the gear including a computer with a 64-bit operating system running Windows 10 Pro, an Intel(R) Core(TM) i5-9300H CPU running at 2.40 GHz, 16.0 GB of RAM, and an x64-based processor. Next, we used a normalization process in [10] for our data to mitigate the impacts of different feature scales as given in Equation (14). Thus, all features contribute equally to the model, and the stability and efficiency of the optimization algorithms are improved, resulting in more accurate results and shorter convergence times during training. The formula used for normalization is as follows:  
\[x_{n}=\frac{2(x-x_{\min})}{x_{\max}-x_{\min}}-1 \tag{14}\]  
Figure 4: Input parameters used in path loss prediction with machine learning. \begin{table}
\begin{tabular}{l l} \hline \hline
**Input Feature** & **Description** \\ \hline Number of Antennas & Measurements were categorized into two groups: single (0) and double (1) antenna setups. \\ Antenna Position & The position of the antennas was classified as either inside (0) or outside (1) the vehicle. \\ Weather Conditions & Measurements were taken under two different weather conditions: sunny (0) and snowy (1) days. \\ Direction of Vehicles & Measurements were conducted based on the direction of the vehicles, either opposite (0) or the same (1). \\ Distance & The distance between vehicles was considered in meters. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Description of input features. where \(x_{n}\) refers to the normalized value, \(x\) is the original value, and \(x_{\min}\) and \(x_{\max}\) represent the minimum and maximum values in the data, respectively.