## 4 Our Proposed Algorithm
### Modified Diffusion Wavelets  
Conventional CS-based data-gathering approaches generally assume that sensor node readings have perfect sparse features under FFT, DWT, DCT, etc. To make full use of the spatial correlation property, which is demonstrated by experiments in Section 4.1, we take diffusion wavelets [36] as the sparse basis considering the spatial correlation of sensor node readings in WSNs. One is the nodes degree, and the other is the distance between the different sensor nodes. In addition, an improved QR decomposition of Givens transform is introduced to set up the sparse basis. Then, we describe how to construct the modified diffusion wavelets in detail. However, diffusion wavelets are affected significantly by the diffusion operator, which is equivalent to the wavelet function of a discrete wavelet transform. Diffusion is utilized as a smoothing and scaling technique to enable multi-scale and coarse-grained application. The detailed steps are shown in Algorithm 1. Step 1: Suppose that \(G(V,E)\) denotes a graph with \(N\) sensor nodes deployed in the monitoring environment, as indicated in Section 3.2. Diffusion wavelets are introduced to set up an orthonormal basis for functions supported by the topology graph of WSNs. In this section, we take a random deployment of WSNs to explain this process. WSNs' topology of 640 sensor nodes is shown in Figure 3. In Figure 3, the hexagram vertex represents the sensor node, while the blue edge denotes the wireless link. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Name** & **Temperature** & **Humidity** & **Solar Radiation** & **Wind** & **Water** & **Light** & **Voltage** \\ \hline LUCE-EPFL & 2.971 & 2.810 & 2.450 & 2.484 & 2.991 & — & — \\ IntelLab & 2.543 & 1.629 & — & — & — & 2.151 & 1.015 \\ CitySense & 3.034 & — & — & 3.256 & — & — & — \\ DEI & 2.589 & 2.510 & — & — & — & 0.592 & — \\ OrangeLab & 2.832 & — & — & — & — & 1.193 & 1.836 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Analysis of the marginal entropy (in bits) of different datasets in WSNs. Figure 2: Spatial compressibility of CitySense temperature. Step 2: Calculate the weight adjacency matrix of \(G(V,E)\), which is denoted as \(\Omega~{}=~{}\left[w_{i,j}\right]\). \(w_{i,j}\) is the weight of the edge in the graph. In this section, we consider two different cases of weight. The sensor node degree is chosen as the weight in the first scheme, while the distance between sensor nodes is taken into consideration to exploit the spatial correlation features, aiming to mitigate the load of WSNs in another scheme. In the former case, we show an example of a graph and corresponding weight adjacency matrix in Figure 4. In the latter case, the weight function is given below in Equation (11), which follows a similar method to [37]. \[w_{ij}=\left\{ \begin{array}{ll}d_{ij}^{\gamma}&,i\
eq j,d_{ij}\leq r\\ \chi&,\text{otherwise}\end{array} \right., \tag{11}\]  
where \(r\) is the maximum distance among the sensor nodes that can directly communicate by a single hop. \(d_{ij}\) is the Euclidean distance between node \(i\) and node \(j\). \(\gamma\) is a negative number, while \(\chi\) is a small positive number. Step 3: Generate a normalized Laplacian matrix of \(G(V,E)\): \(\Lambda=\left[\lambda_{ij}\right]\). In [38], [PERSON] et al. indicates that \(\Lambda\) is the degree of correlations among different function values provided at the vertices of the graph \(G(V,E)\). In the first schedule, we denote \(\lambda_{ij}\) using Equation (12), while the other schedule considering spatial correlation implements Equation (13). Generally speaking, an eigenvalue or eigenvector shows the special correlations at some scale. We need to split the space of \(\Lambda\) if we decompose the signal sampled of the \(G(V,E)\) in a multi-scale. \[\lambda_{ij}=\left\{ \begin{array}{ll}1,&i=j\\ -\frac{w_{ij}}{\sqrt{\sum_{u}w_{u}w_{u}\sum_{u}w_{u}}},&\text{otherwise}\end{array} \right. \tag{12}\]  
Figure 4: An example of the weighted adjacency matrix of a graph. Figure 3: Topology of WSNs.