# Inversion of Rayleigh Wave Dispersion Curve Extracting from Ambient Noise Based on DNN Architecture
## 2 Materials and Methods
### Generate Training Dataset
#### 2.1.1 Generate Velocity Models  
Academic [PERSON], a well-known geophysicist in China, pointed out that there is no simple repetition in the history of the earth's evolution in the past 4600 million years, and it shows the ergodicity of all states [25]. Just as \"There are no two identical leaves in the world\", a variety of phenomena in the natural system confirms the validity of the ergodic hypothesis. As with the surface of the earth, the velocity structure of the near surface should also have ergodicity. In addition, the natural system has the inertia of maintaining its characteristic shape in evolution, making the strata show orderliness with the change in time and space. That is to say, the velocities will rise with the increase in depth due to the self-weight (inertia) of the strata. The variation in velocities may be shown in three cases. One is when the velocity increases approximately linearly with the depth; the second is when the velocity drops sharply at a certain depth, such as when there exists a cavity or weak interlayer in the subsurface; the third is when the velocity rises sharply at a certain depth, such as the existence of boulders. The strata with an oscillating or linearly decreasing velocity are rarely seen. According to the general rule of sediment deposit, the first case is a high-probability event, while the other two are low-probability events. Compared with the giant earth system, the velocity structure of the near surface has a higher complexity. In the evolution process, any type of velocity structure may appear in different areas or at different times. So, the near-surface velocities possess ergodicity and completely satisfy the random process theory. According to the probability and mathematical statistics theory, the Markov Chain (MC) is a method used to describe stochastic processes for discrete-time index datasets and state spaces with Markov properties [26]. MC has ergodicity, which makes a good combination between MC and strata evolution. If we regard the variation in velocities as a time series, the depth of each layer is regardedas equivalent to time, so the S-wave velocity is the state space of the corresponding time. Therefore, the MC of the random variation process of the velocity structure can be expressed as \(\{v(t),t\in T\}\), and its Markov property can be expressed as  
\[ \begin{split} P\{v(t_{n})=j|v(t_{n-1})\,=i_{n},v(t_{n-1})=i_{n-1}, \cdots,v(t_{1})=i_{1}\}\\ =P\{v(t_{n})=j|v(t_{n-1})=i_{n-1}\}=P_{ij}\end{split}  \tag{1}\]  
In Equation (1), \(t_{n}\) is the time series, and \(t_{1}<t_{2}<\cdots<t_{n}\in T\), \(v_{n}\in V\) is the corresponding state space variable; \(P_{ij}(>0)\) is the one-step transition probability for all states \(i,j\) and \(n\). Equation (1) indicates that the probability of state \(j\) at time \(t_{n}\) is determined by state \(i\) at time \(t_{n-1}\). Therefore, the velocity of the current layer only depends on the velocity of the previous layer and has no relation to the velocity of other layers. The orderliness of the velocity structure shows that the velocity increasing linearly with depth is a high-probability event, while other cases are low-probability events. Thus, we can define the MC transition probability of the velocity variation. In our study, the basic steps of constructing a near-surface velocity model according to the MC theory are listed as follows:  
Step 1: Generate a model with a random thickness. The total thickness of the model is limited to 0.05 km because we focus on solving shallow engineering geological problems. Here, we set the model layer number to 20. Then, we use a random function to generate 20 random numbers between 0 and 1, and finally, they are normalized and multiplied by the total thickness to obtain the thickness of each layer. Step 2: Generate random S-wave velocity for the first layer. Because the surface layer is usually quaternary sedimentary, the velocity is generally low; the S-wave velocity may not be appropriate. So, we constrain the velocity range according to the geological conditions.