## 3 The Proposed Framework for Anomalous Event Recognition
### Proposed Joint Learning Model and Multiple Ranking Measures (MRMs)
#### 3.3.3 Proposed Multiple Ranking Measures  
Similar to [PERSON] et al. [14] work, we also considered the anomalous event detection problem as a regression problem, where we want the sample with an anomalous event to have a greater abnormality score than the normal event instance. To achieve this, one of the possible solutions could be the ranking loss to train our network. Ranking loss with instance-level or sample-level annotations can be mentioned as follows:  
\[R(S_{a})>R(S_{n}) \tag{2}\]where anomalous videos' samples and normal videos' samples are represented as \(S_{a}\) and \(S_{n}\), respectively. Functions \(R(S_{a})\) and \(R(S_{n})\) stand for the corresponding predicted abnormality scores. The range for the abnormality score function \(R(x)\) is between 0 and 1. Because of the unavailability of instance-level or sample-level annotations, Equation (2) cannot be used. Consequently, we propose a new objective function using MRMs to train our model using DMIL. Moreover, the idea of proposing a new objective function is motivated by another critical goal of reducing the false alarm rates, which may be produced by our proposed anomalous event detection framework, DMRMs. The following are two cases of false alarms:  
(Case 1) False positive: The detector predicts a normal event as an anomalous event. (Case 2) False negative: The detector predicts an anomalous event as a normal event. To alleviate the aforementioned false alarms and develop a more suitable ranking loss function than the one described in Equation (2), as well as to train our model using DMIL, the following ranking measure conditions are proposed in Equations (3) and (4). \[\max_{i\in S_{a}}R\Big{(}S_{a}^{i}\Big{)}>\max_{i\in S_{n}}R\Big{(}S_{n}^{i} \Big{)} \tag{3}\]  
\[\max_{i\in S_{a}}R\Big{(}S_{a}^{i}\Big{)}>\min_{i\in S_{a}}R\Big{(}S_{a}^{i} \Big{)} \tag{4}\]  
Equations (3) and (4) are proposed to avoid the false alarm in case 1. In Equations (3) and (4), the highest-ranked instance or sample of the positive group \((S_{a})\)-most likely a true positive-is compared with the highest-ranked instance or sample of the negative group \((S_{n})\) and the lowest-ranked sample of the positive group \((S_{a})\), respectively-most likely false positives. We still need to alleviate the second type of false alarms of case 2. To this end, we proposed additional ranking measure conditions in Equations (6) and (7). The abnormality scores of each instance of the positive group are arranged in descending order of scores as described below:  
\[[J_{1},J_{2},J_{3},...,J_{N}]=order_{i\in S_{a}}^{\prime desc}R\Big{(}S_{a}^{i} \Big{)} \tag{5}\]  
where each group has a total N number of instances. \[J_{2}>\max_{i\in S_{n}}R\Big{(}S_{n}^{i}\Big{)} \tag{6}\]  
\[J_{3}>\max_{i\in S_{n}}R\Big{(}S_{n}^{i}\Big{)} \tag{7}\]  
...  
Equations (6) and (7) are proposed to avoid both cases (case 1 and case 2) of false alarms. In Equations (6) and (7), the second-highest and third-highest ranked samples of the positive group \((S_{a})\), respectively, are compared with the highest-ranked sample of the negative group \((S_{n})\)-most likely a false positive. Since the training videos are large in size and lengthy, there is a possibility of the presence of anomalous events in multiple instances (as shown in Section 4.4.2). Therefore, we propose the aforementioned ranking conditions, Equations (6) and (7), to reduce the incidence of false alarm cases, 1 and 2. The proposed conditions also maximize the abnormality scores of instances or samples of the positive group \((S_{a})\) and minimize those of the negative group \((S_{n})\). However, a comparison between a less highly ranked positive instance (as in Equation (7) and so on) and the highest-ranked instance of negative groups starts affecting the framework's accuracy (as shown in Section 4.4.3). Therefore, based on the conducted experiments, we have excluded all the ranking conditions with less highly ranked instances, including Equation (7) ranking condition, and so on.