# Landslide Prediction with Model Switching +
## 3 Model Switched Landslide Prediction System
### Imbalanced-Class Prediction Design  
Class balance enhancements are needed to handle training samples with an unbalanced class distribution [14]. The Adaptive Synthetic Sampling (ADASYN) method [1] is used here for balancing the imbalanced data (i.e., data is pre-processed using ADASYN), and then the processed dataset are used to train the event-class predictor, which is also a BPNN model. In the following, the ADASYN algorithm is described as follows. Data Pre-Processing Using ADASYN Algorithm  
The ADASYN algorithm can improve the data imbalance problem by synthetically creating new samples from the unstable class by linear interpolation between existing unstable class samples. This approach, by itself, is known as the Synthetic Minority Over-sampling Technique (SMOTE) method [15]. ADASYN is an extension of SMOTE, creating more samples in the vicinity of the boundary between the two classes than in the interior of the unstable class. To create more synthetic data for the unstable class, FS, rainfall, and soil moisture are used as the training data and the corresponding class label, \(y_{i}\), is constructed according the classification region. Given the training samples \((X_{i},y_{i})\), \(i=1,...,N\), where \(X_{i}=<x_{i,fs},x_{i,r},x_{i,sm},x_{i,slope}>\in R^{n}\), \(x_{i,fs}\) is the FS value, \(x_{i,r}\) is the rainfall, \(x_{i,sm}\) is the soil moisture, \(x_{i,slope}\) is the slope gradient, and \(y_{i}\) is the class label. The training samples, \(X_{i}\), are classified by Equation (7). For \(x_{i,fs}\geq 1.3\), \(x_{i}\) classifies as stable class. On the other hand, if \(x_{i,fs}<1.3\), then \(x_{i}\) classifies as unstable class. After \(X_{i}\) is classified, the class label, \(y_{i}\), is set by Equation (8). If \(X_{i}\in StableClass\), \(y_{i}\) is set as \(0\). If \(X_{i}\in UnstableClass\), \(y_{i}\) is set as \(1\). \[\left\{ \begin{array}{rl}&\text{ if }x_{i,fs}\geq 1.3,X_{i}\in Stable\ Class\\ &\text{ if }x_{i,fs}<1.3,X_{i}\in Unstable\ Class\end{array} \right.^{\prime}, \tag{7}\]  
\[y_{i}=\left\{ \begin{array}{rl}0&\text{ if }X_{i}\in Stable\ Class\\ 1&\text{ if }X_{i}\in Unstable\ Class\end{array} \right.. \tag{8}\]  
To adjust class balance, the degree of class imbalance is needed to be calculated by Equation (9):  
\[d=N_{m}/N_{s}, \tag{9}\]  
where  
* \(N_{m}\): The size of unstable class examples; and
* \(N_{s}\): The size of stable class examples. Furthermore, the default level, \(d_{default}\), which is the threshold for the level of maximum class imbalance tolerated, also needs to be determined beforehand. If the current \(d\) is smaller than the threshold degree, \(d_{default}\), then the number of synthetic data samples that need to be generated for the unstable class is calculated using Equation (10):  
\[R=(N_{s}-N_{m})\times\beta, \tag{10}\]  
where \(\beta\in[0,1]\) is a parameter used to specify the desired balance level after generation of the synthetic data: \(\beta=1\) means a fully balanced data set is created after the generalization process. For each \(X_{i}\in Unstable\ Class\), \(K\) nearest neighbours can be found by using the Euclidean distance. The ratio \(r_{i}\), defined in Equation (11), which represents the number of stable-classified in the \(K\) nearest neighbours, and its normal form, \(\hat{r}_{i}\), defined in Equation (12), are calculated, where \(\hat{r}_{i}\) is called a density distribution of \(r_{i}\), (\(\sum\limits_{i}\hat{r}_{i}=1\)). \[r_{i}=h_{i}/K,\qquad i=1,...,N_{m}, \tag{11}\]  
\[\hat{r}_{i}=r_{i}/\sum\limits_{i=1}^{N_{m}}r_{i}, \tag{12}\]  
where \(h_{i}\) is the number of samples in the \(K\) nearest neighbours of \(x_{i}\) that belong to the stable class; therefore, \(r_{i}\in[0,1]\). Thus, the number of synthetic data samples that need to be generated for each unstable class sample, \(X_{unstable}\), can be calculated by Equation (13). \[g_{i}=\hat{r}_{i}\times R, \tag{13}\]  
where \(R\) is the total number of synthetic data samples that need to be generated for the unstable class, as defined in Equation (10).