# Seismic Signal Compression Using Nonparametric Bayesian Dictionary Learning via Clustering
## 3 Seismic Signal Compression Using Nonparametric Bayesian Dictionary Learning via Clustering
### Online Testing
We used _perplexity_[24] as the measurement, which can be given by

\[\textit{perplexity}=exp\{-\frac{\sum_{i=1}^{n}\log p(\textbf{x}_{i})}{\sum_{i=1} ^{n}m_{i}}\}, \tag{9}\]

A log-likelihood \(\log p(\textbf{x}_{i})\) is assigned to each segment \(\textbf{x}_{i}\). \(m_{i}\) is the number of features extracted from \(\textbf{x}_{i}\), and \(n\) is the number of segments. We used 6 patches as the testing data and 6 previous patches as the training data. The experimental results are shown in Tables 1 and 2. MMNB had a lower (better) perplexity on most of the training and testing data when compared with NB. ### Dictionary Learning Experiment

Figure 5 shows the clustering results after cluster merging based on Algorithm 1. The dimension of data points (feature of segments) is reduced for demonstration, where the data points with the same color belong to the same cluster. Two training and testing data are shown here for demonstration. The initial number of clustering is 8. After merging of the cluster, the actual number of clusters for data 1 (both testing and training) and data 2 are separately 6 and 5. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Training Data** & **1** & **2** & **3** & **4** & **5** & **6** \\ \hline NB & \(0.198\pm 0.022\) & \(0.175\pm 0.023\) & \(0.144\pm 0.015\) & \(0.182\pm 0.016\) & \(0.196\pm 0.020\) & \(0.217\pm 0.023\) \\ MMNB & \(0.184\pm 0.019\) & \(0.167\pm 0.018\) & \(0.143\pm 0.014\) & \(0.185\pm 0.019\) & \(0.178\pm 0.018\) & \(0.195\pm 0.021\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Perplexity of mixed-membership naive Bayes model (MMNB) and naive Bayes (NB) on the training data. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Training Data** & **1** & **2** & **3** & **4** & **5** & **6** \\ \hline NB & \(0.257\pm 0.035\) & \(0.242\pm 0.032\) & \(0.220\pm 0.023\) & \(0.251\pm 0.027\) & \(0.268\pm 0.042\) & \(0.302\pm 0.061\) \\ MMNB & \(0.232\pm 0.031\) & \(0.230\pm 0.029\) & \(0.219\pm 0.021\) & \(0.251\pm 0.027\) & \(0.263\pm 0.041\) & \(0.292\pm 0.052\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Perplexity of MMNB and NB on the testing data. Figure 5: Clustering Results (**a**) Training Data 1; (**b**) Testing Data 1; (**c**) Training Data 2; (**d**) Testing Data 2. Secondly, we wanted to validate the efficiency of non-parametric Bayesian dictionary learning based on clustering (NBDLC). Different dictionary learning and sparse representation methods, including K-SVD+OMP, K-SVD+ORMP, K-SVD+PS and TSITD, are compared. The initial dictionary size was \(16\times 128\) and the size of the test seismic signals in this experiment was \(16\times 1000\). In K-SVD+OMP, K-SVD+ORMP, K-SVD+PS, TSITD, and NBDLC, the number of nonzero coefficients is separately controlled by the sparsity and the sparsity prior parameters (\(a_{0}\) and \(b_{0}\)). The experimental result is shown in Figure 6. From Figure 6, NBDLC could have the best reconstruction quality with a similar number of nonzero coefficients compared with other dictionary learning methods. Furthermore, the dictionary sizes are inferred from the seismic signals of each cluster in NBDLC. For example, in our experiments, the minimum dictionary size of NBDLC was \(16\times 83\). This is beneficial in reducing the rate of coding for nonzero coefficients' position. ### Comparison of Compression Performance

Finally, we carried out a qualitative comparison of seismic signal compression methods based on DCT, Curvelet, OffDL, DLOD and the proposed method on four test data from different sensors. In OffDL, offline data (different from the above four data) is adopted to train the dictionary. K-SVD and PS were used as the dictionary learning and sparse representation methods. A pseudo-random algorithm was used to generate the same random variables in the coder and decoder for the Bayesian dictionary learning process. In DCT and Curvelet, a desired sparsity can be obtained by only maintaining some significant coefficients.