## 4 Proposed Approach  
In this paper, we introduce an active learning approach based on a threshold parameter (\(\mu\)) to enhance classifier performance, construct robust models capable of operating effectively across diverse environments for detecting physical violence in videos by analyzing each photograph, and build high-quality datasets with the intervention of a human expert. This approach comprises two stages, presented in Sections 4.1 and 4.2, and outlined in Algorithms 1-4.  
Algorithm 1 initiates the active learning process by first constructing the initial classifier, followed by the execution of the active learning approach. Algorithm 2 delineates the key steps of the active learning approach based on a threshold. This includes classification by a neural network model and human expert intervention, facilitating iterative improvement of the classifier through selective labeling of data. Algorithm 3 focuses on training and testing the models using both the original and updated datasets (\(DB\)), incorporating ambiguous samples that have been labeled and added to \(DB\). Finally, Algorithm 4 details the process used to obtain the threshold \(\mu\).  
```
1:\(DB\), M\({}_{j}\), \(T[]\);/*\(DB\) is the training dataset, \(M_{0}\) is the initial model, and \(T\) is a set of unlabeled datasets. */
2:
3:\(\mu\leftarrow\) 0; /* Default value for \(\mu\) is zero.*/
4:M\({}_{j}\) =OPTIMIZE(M\({}_{j},DB,\mu\)); /* Algorithm 3 is performed to built the initial model \(M_{0}\) using \(DB\), which is a labeled dataset. */
5:\(\mu\) = THRESHOLD(\(M_{j},DB\)); /*Algorithm 4 is employed to obtain the best value to \(\mu\) threshold.
6:Stage 2:
7:\(j\gets 1\); /* \(T_{j}\) is an unlabeled and unknown dataset */
8:while new unlabeled datasets \(T_{j}\) exist do
9:M\({}_{j}\) =ACTIVE-LEARNING(M\({}_{j-1},DB,T_{j},\mu\)); /* Algorithm 2 is performed returning the optimized model \(M_{j}\)*/
10:\(\mu\) = THRESHOLD(\(M_{j},DB\)); /* Re-calculate the threshold \(\mu\) using Algorithm 4. */
11:\(j\gets j+1\);
12:endwhile
```  
**Algorithm 1** Proposed active learning approach```
0:\(M_{j},DB,\mu\);/*\(M_{j}\) is the neural network model, \(DB\) is the training dataset. */
0:\(M_{j}\);/* Return the optimized model */
0:
1:\(k\gets 0\); /*\(k=0,1,2,...,K\), where \(K\) is the maximum number of epochs */ /* Obtain the training (\(DBTrain\)) and test (\(DBTest\)) datasets, where \(DB=DBTrain\cup DBTest\); and \(DBTrain\cap DBTest=\varnothing\); */
2:\(DBTrain=\texttt{getRandomly}(DB,70\%)\);
3:\(DBTest=\texttt{getRandomly}(DB,30\%)\);
4:while\((AUC_{k-2}\leq AUC_{k-1}\textbf{ and }k>1)\textbf{ or }(k<K)\)do
5:\(\textbf{LEARNING}(M_{j},DBTrain)\); /* Train the model \(M_{j}\) with \(DB\) */
6:\(AUC_{k}  
```
1:\(\mu_{ini}=0\);
2:for\(q=0\)to\(\|DB\|\)do
3:\(\mathbf{z}_{q}\leftarrow\mathbf{M}_{j}(x_{q})\); / \(\mathbf{z}\) is the neural network output to sample \(x_{q}\)*/
4:\(\mathbf{d}_{q}\leftarrow\mathbf{LABEL}(x_{q},DB)\); /* \(\mathbf{d}\) is the correct label to sample \(x_{q}\)*/
5:if\((\mathbf{z}_{q}<\mathbf{d}_{q})\)then
6:\(\mu_{ini}+(\mathbf{z}_{q}(0)-\mathbf{z}_{q}(1))^{2}\);
7:endif
8:endfor
9:\(\mu=\frac{P_{ini}}{\|DB\|}+\Delta\);
10:return\(\mu\);
```  
**Algorithm 4** Obtaining the threshold \(\mu\)