## 2 Methodology
### Machine Learning Algorithms
Figure 1 illustrates an example of labeling the noise and non-noise data on 31 July and 1 August 2019. We first apply a CNR filter with a threshold of \(-28\) dB, see Figure 1a. The background is not clean, which means the filtered data still contain many data points that should be classified as noise. Subsequently, we apply the DBSCAN method to cluster the remaining data (Figure 1b). The algorithm divides the data points into groups based on their density. Since most of the noise is filtered already, the noise data have a significantly lower density compared to non-noise data. In this way, we can remove the noise (blue dots in Figure 1b) from the data. The two separate groups (yellow and purple in Figure 1b,c) are considered as clouds that are far apart from most non-noise data points within and close to the boundary layer (the orange group Figure 1b,c). By removing all noise data (blue dots), the resulting filtered data have quite a clean background (Figure 1c). The separated cloud groups (yellow and purple) are labeled as high clouds. Here, the definition of \"high clouds\" is different from the traditional meteorological definition, that is, clouds that are significantly apart from the clouds within and right above the boundary layer. In this case, there are some clouds at 7:00 UTC 31 July, with an altitude of 6 to 8 km, but they can not distinctly be separated from the low clouds within or at the top of the boundary layer (e.g., the clouds at around 2 km in the afternoon of 31 July) and not separated by the DBSCAN cluster, we will not treat them as \"high clouds\" in this study. These orange data points will be further labeled in the next section and be used as classes to train the classification  
model. All the data points are now labeled as noise and non-noise. Since the noise is mainly relevant to CNR, we use CNR as the only feature and the noise/non-noise data as the classes to train an RF model. In this way, a noise discrimination model is trained, and the results are shown together with the classification model in Section 3. Classification Model  
In the frame of a supervised machine learning algorithm, RF needs a labeled data set for training. The four-day data used here contain more than 7.8 million data points, which makes it impossible to label all the data points manually. Based on the weather conditions of these four days [20], we divide the lidar data into eight groups: low clouds (group 1); high clouds (group 2); rain (group 3); aerosol type I (group 4); aerosol type II (group 5); aerosol type III (group 6); others (non-noise, group 7); noise (group 8). The noise is determined by CNR and DBSCAN cluster, as described above, and the high clouds are separated as well during the DBSCAN clustering. Low clouds are the easiest to distinguish. The training dates were all collected during summer 2019. The low clouds are all water clouds, with strong backscatter signals and a low depolarization ratio, usually found at the top of the boundary layer or close to the surface. They are separated by \(\beta\) and \(\delta\) thresholds from the red dots in Figure 1d. We simply label the clouds that are discriminated from noise by DBSCAN methods above the boundary layer as high clouds (Figure 1d, purple dots). According to [20], three types of aerosols were detected during these four days. All three types are considered to be dust aerosols. We divided the aerosols into three different classes because they have different dust origins, and the water vapor in the atmosphere turned out to have a significant impact on the lidar measurements of dust aerosols, and these three types correspond to three situations [20]. Type I was observed on 14 June and 15 June 2019 when the atmosphere was relatively dry, and lidar measurements showed high \(\beta\) and high \(\delta\) values. On the morning of 31 July, the atmosphere was dry, and the \(\delta\) values were high, but \(\beta\) values were relatively low.