# Landslide Prediction with Model Switching +
## 3 Model Switched Landslide Prediction System
### Switch-Based Prediction Model Design  
To address the issue of imbalanced data between the unstable and stable classes, a switch-based neural network prediction algorithm is proposed, as detailed in Algorithm 2. The environmental factors, including rainfall, soil moisture, and slope gradient, are used to calculate the FS values, \(x_{i,fs}\), using the SHALSTAB model. Given the environmental samples \(D_{landside}=\{x_{i}\}\), where \(x_{i}=<x_{i,r},x_{i,sm},x_{i,slope}>\), \(x_{i,r}\) is the rainfall, \(x_{i,sm}\) is the soil moisture, and \(x_{i,slope}\) is the slope gradient, the FS values, \(x_{i,fs}\), are calculated given the set of all training samples, \(T_{sample}\), where \(T_{sample}=\{X_{i}|X_{i}=<x_{i,fs},x_{i,r},x_{i,sm},x_{i,slope}>\}\). Then, the corresponding class labels \(y_{i}\), \(T_{class}=\{X_{i},y_{i}\}\), can be constructed and classified by Equations (7) and (8). To construct the BPNN models for different data patterns, the calculated FS need to be classified in two subsets, as follows:  
\[T_{class1}=\{x_{i,fs}|x_{i,fs}\in X_{i},x_{i,fs}\in Stable\ Class\}, \tag{15}\]  
\[T_{class2}=\{x_{i,fs}|x_{i,fs}\in X_{i},x_{i,fs}\in Unstable\ Class\}, \tag{16}\]  
where \(T_{class1}\) is the set of FS values for \(x_{i,fs}\), in \(X_{i}\in StableClass\), and \(T_{class2}\) is the set of FS values for \(x_{i,fs}\), in \(X_{i}\in UnstableClass\); so that \(T_{class1}\bigcap T_{class2}=\phi\) and \(T_{class1}\bigcup T_{class2}=x_{i,fs}\). ```
Input: \(D_{landslide}\): \(\{x_{i}|x_{i}=<x_{i,r},x_{i,sm},x_{i,slope}>\}\); \(P_{test}\): \(\{x_{i}|x_{t}=<x_{t,fs},x_{t,r},x_{t,sm},x_{t,slope},y_{t}>\}\) for prediction; Output: \(P_{output}\): \(\{FS_{predict}\}\); Variable: \(T_{sample}\): \(\{X_{i}|X_{i}=<x_{i,fs},x_{i,r},x_{i,sm},x_{i,slope}>\}\); \(T_{class}\): \(\{<y_{i},x_{i,fs},x_{i,r},x_{i,sm},x_{i,slope}>\}\); \(T_{class1}\): \(\{x_{i,fs}|y_{i}=0\}\); \(T_{class2}\): \(\{x_{i,fs}|y_{i}=1\}\); \(T_{ADASYN}\): \(\{<x_{new,fs},x_{new,r},x_{new,sm},x_{new,slope},y_{i}=1>\}\); \(P_{class}\): \(\{y_{predict}\}\); // SHALSTAB model
1\(T_{sample}=calculateSHALSTAB(D_{landslide})\); // Equation (1) // Classification
2\([T_{class},T_{class1},T_{class2}]=calculateClass(T_{sample})\); // Equations (7) and (8) // Data pre-processing
3\(T_{ADASYN}=calculateADASYN(T_{class})\); // Equation (14) // Construct each prediction model
4\(Feed-Forward\)\(BPNN_{Stable}\leftarrow PredictionModel(T_{class1})\);
5\(Feed-Forward\)\(BPNN_{Unstable}\leftarrow PredictionModel(T_{class2})\);
6\(Event-class\)\(predictor\gets PredictionModel(T_{class}+T_{ADASYN})\); // Model switch
7\(P_{class}=Event-class\)\(predictor(P_{test})\);
8 if\(P_{class}==Stable\)then // Prediction class is stable
9\(P_{output}=Feed-Forward\)\(BPNN_{Stable}(P_{test})\)
10 else // Prediction class is unstable
11\(P_{output}=Feed-Forward\)\(BPNN_{Unstable}(P_{test})\)
12
13 return\(P_{output}\);
```  
**Algorithm 2**Switch-based Neural Networks Prediction Algorithm. Here, the ADASYN algorithm is used to produce new synthetic samples for the unstable class, in order to balance the sizes of the two classes. The processed dataset, \(T_{ADASYN}\), is used to predict the future class using a BPNN model. The event-class predictor can switch between the different models, according to the predicted class. As shown in Figure 4, the steps of the event-class predictor are as follows. First, \(T_{class}\) is selected to construct the synthetic dataset \(T_{ADASYN}=\{<sd_{new},y_{new}>\}\) for balancing class distribution by the ADASYN algorithm, where \(sd_{new}\) are the new synthetic samples, \(sd_{new}=<x_{new,fs},x_{new,r},x_{new,sm},x_{new,slope}>\), and \(y_{new}=1\) represents that the synthetic class label is unstable class. The synthetic \(sd_{new}\) include \(x_{new,fs}\), the new synthetic FS value; \(x_{new,r}\), the new synthetic rainfall; \(x_{new,sm}\), the new synthetic soil moisture; and \(x_{new,slope}\), the new synthetic slope gradient.