# Deep Learning- and IoT-Based Framework for Rock-Fall Early Warning
## 4 Methodology
### Rock-Fall Prediction Model Augmentation  
The prediction made by the deep learning model is subject to noise, model errors, and uncertainty [36]. Therefore, it is highly desirable for any AI-based system to represent uncertainty in a reliable manner. In this part of the article, the prediction model has been enhanced by increasing the overall level of model accuracy so that a precise decision can be made to reduce the chance of a rock falling.  
For our proposed model, noise in data and inadequate knowledge lead to uncertainty in data; subsequently, the naturally uncertain nature of the data is modeled by the predictions, making it irreducible. In this study, to address this problem, a new method was proposed to decrease uncertainty by diminishing two instances of confusion: situations where certain events occur but are identified as undetected are false negatives (FN) and cases where some events not occur but are identified as present are false positives (FP).  
The augmented rock-fall prediction probability P(J) is obtained by applying the union of independent probabilities theory between the probability of the rock-fall risk according to the detection models P(D), and the possibility of a rock fall according to the prediction models P(p). Figure 5 shows the steps involved in calculating the joint rock-fall probabilities utilizing detection and prediction models.  
The rock-fall probability of the detection models is calculated from the micro-seismic detection model and the computer vision detection model, and then the joint probability is calculated as in Equation (14).  
\[P(D)=P(S\cup V)=P(S)+P(V)-P(S\cap V) \tag{14}\]  
where \(P(D)\) is the rock-fall probability of the detection models, \(P(S\cup V)\) is the union probability, \(P(S)\) is the rock-fall probability determined by the micro-seismic detection, \(P(V)\) is the rock-fall probability determined by the computer vision detection model, and \(P(S\cap V)\) is the probability that \(P(S)\) and \(P(V)\) are mutually exclusive. In this study, \(P(S)\) was determined from the spectral amplitude ratio (\(R\)) of the micro-seismic event, as in Equation (15).  
\[P(S)=\frac{R}{R_{MAX}} \tag{15}\]  
where \(R\) is the spectral amplitude ratio of a micro-seismic event, and takes the values from (1.5 \(\pm\) 0.08) to (7.1 \(\pm\) 0.68), as mentioned in Section 4.2, and \(R_{MAX}\) is the ratio of the spectral amplitude when the rock-fall occurrence is confirmed, and its value is equal to (7.78). The \(P(V)\) value is 0 in cases where no rock fall is detected, and it is valued at 1 in cases where rock fall is detected. By substituting the values of the probabilities into Equation (6), we obtain Equation (16).  
\[P(D)=\frac{R}{(7.78)}+P(V)-\frac{R}{(7.78)}\times P(V) \tag{16}\]  
The rock-fall occurrence probability (\(P^{*}\)), which was obtained from the prediction model (artificial neural network), was used to determine the rock-fall risk probability. Finally, the augmented rock-fall prediction probability \(P(j)\) was calculated by combining the rock-fall probability of the detection models \(P(D)\) with the rock-fall risk probability of the prediction models \(P(P)\), Equation (17).  
\[P(j)=P(D)+(1-P(D))\times P(P) \tag{17}\]  
The overall accuracy of the augmented model can be obtained from Equation (18).  
\[Au=\frac{(\text{TN}+\text{TP})}{(\text{TN}+\text{TP})+\delta(\text{FN}+\text{ FP})}\times 100\% \tag{18}\]  
where \(Au\) is the augmented model accuracy, and \(\delta\) is the uncertainty-decreasing factor.  
\[\delta=(1-P(D)) \tag{19}\]