## 3 Data Analysis
### Clustering and Data Representation  
Radio channel simulation between Tx and Rx using ray tracing can result in several hundreds, and even thousands, of rays with similar characteristics. Ray clustering [22] involving grouping similar beams into groups called clusters is often used in the literature [22] and standards [34]. In this work, we also employ this approach and group together beams that have close AoA or AoD values.  
As mentioned previously, AoA and AoD are characterized by two angles--azimuth and elevation--which are measured in degrees and vary in the ranges \((-180,180]\) and \([-90,90]\), respectively. To benefit from the powerful ML techniques developed for video processing, and also to perform clustering, we represent each data point, i.e., a set \(\mathcal{I}(s)\), in the form of two images or video-like frames: one for AoA reflecting Rx's perspective and one for AoD, and hence, Tx. The following procedure is performed for \(\mathcal{I}^{\text{AoA}}(s)\) and \(\mathcal{I}^{\text{AoD}}(s)\) separately, and indices AoA and AoD are therefore omitted.  
Consider \(\mathcal{I}^{X}(s)\), where \(X\in\{\text{AoA},\text{AoD}\}\). First, we choose azimuth and elevation resolutions denoted by \(K_{\varphi}\) and \(K_{\theta}\), respectively. We partition the range of azimuth angles \((-180,180]\) into \(K_{\varphi}\) equal intervals of the form  
\[\Phi_{j}=(-180+(j-1)\times 360/K_{\varphi},-180+j\times 360/K_{\varphi}),\ \ j=1, \ldots,K_{\varphi}. \tag{2}\]  
Similarly, we partition the range of elevation angles \([-90,90]\) into \(K_{\theta}\) intervals  
\[\Theta_{1} =[-90,-90+180/K_{\theta}],\] \[\Theta_{j} =(-90+(j-1)\times 180/K_{\theta},-90+j\times 180/K_{\theta}],\ \ j=2, \ldots,K_{\theta}. \tag{3}\]  
Now, a cluster \(\mathcal{C}_{m,n}(s)\subset\mathcal{I}^{X}(s)\) consists of such rays \(i_{s,j}\in\mathcal{I}^{X}(s)\) whose azimuth angle belongs to \(\Phi_{n}\) and elevation angle to \(\Theta_{m}\), i.e.,  
\[\mathcal{C}_{m,n}(s)=\{(\varphi_{s,j},\theta_{s,j},PL_{s,j})\in\mathcal{I}^{X} (s):\varphi_{s,j}\in\Phi_{n},\ \theta_{s,j}\in\Theta_{m}\}. \tag{4}\]  
Finally, we represent a data point \(\mathcal{I}^{X}(s)\) describing the channel state at step \(s\) of a studied trajectory as a \(K_{\theta}\times K_{\varphi}\) matrix \(\mathrm{V}_{X}(s)=(v_{m,n}(s))\) whose entries are obtained from \(\mathcal{I}^{X}(s)\) by  
\[v_{m,n}(s)=\begin{cases}200,\ \ \text{if}\ \mathcal{C}_{m,n}(s)=\varnothing,\\ \min_{i_{s,j}\in\mathcal{C}_{m,n}(s)}PL_{s,j},\ \ \text{if}\ \mathcal{C}_{m,n}(s) \
eq\varnothing.\end{cases} \tag{5}\]  
Here, 200 is a blank value, indicating that no rays have been recorded for the cluster. This value is larger than the path loss of all obtained rays. We refer to \(\mathrm{V}_{X}(s)\) as the \(s\)-th frame of the studied trajectory.  
By representing the ray-tracing output in the form \((\mathrm{V}_{\text{AoA}}(s))_{s=1,\ldots,S}\) or \((\mathrm{V}_{\text{AoD}}(s))_{s=1,\ldots,S}\), we represent a studied trajectory as a sequence of frames. Now, the performance of the ray-tracing procedure can be improved via interpolation within a given sequence, i.e., by predicting some intermediate frames based on their neighbors. We note that this task is very similar to video frame interpolation (VFI), and therefore propose to use approaches proven efficient in solving VFI problems to predict intermediate trajectory frames in our ray-tracing scenarios. However, to validate such an approach, we first present a detailed data analysis.