## 2 Background and Related Work
### Machine Learning-Based Anomaly Detection in Other Domains  
In addition to human activity anomaly detection, machine learning models have been applied for anomaly detection in other domains such as cyber security, the IoT, finance, manufacturing, and so on. [PERSON] et al. proposed an artificial neural network (ANN)-based model for identifying adversarial attacks in IoT and industrial IoT networks [38]. They reported the effectiveness of the CNN model in detecting adversarial attacks. Another study for detecting anomalies in cyber security was carried out by [PERSON] et al., where they applied four different machine learning (ML) and deep learning (DL) models for protecting industrial control systems [39]. They optimized the hyper-parameters to propose an adaptive anomaly detection system. To identify anomalies in an IoT network, a study was conducted using different machine learning models, and random forest was found to be more effective [40]. Several ML models have been applied to identify anomalies and fraud in finance. [PERSON] et al. conducted a studies in which they applied seven supervised and two unsupervised models over the general ledger data to identify transaction inconsistencies [41]. Along with the supervised ML models, the unsupervised models have also been used in several studies for anomaly detection. [PERSON] et al. proposed an interpretable deep learning model for classifying anomalies and normal torque sequences in a manufacturing system [42]. As summarized in Table 1, most of the listed studies focused on using threshold-based anomaly-detection methods. This approach entails determining an appropriate threshold value, which is achieved through a trial-and-error process. The datasets utilized in these studies primarily exhibited normal activities, with the models trained on these data and tested with user-generated anomalies. However, the issue with this approach is that the created anomalies may only partially represent some possible anomalies. Additionally, the studies needed to comprehensively analyze the impact of different training-test splitting ratios and \(k\)-fold cross-validation on performance. To address these limitations, we conducted a study that utilized popular machine learning classifiers and two recurrent neural network (RNN) techniques on the ARAS dataset to identify anomalies in human activities. Furthermore, we conducted a comparative evaluation of these methods under different settings. To ensure the validity of our results, we generated 50,000 anomalies by considering all possible scenarios. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Paper** & **Objectives** & **Contributions** & **Limitations** \\ \hline [PERSON] et al. [5] & Recognizing the activity based on the wearable sensors’ data. & Proposed probabilistic model based on HMM for single activity detection. & The dataset contains one activity and the manual extraction and selection of features. \\ \hline [PERSON] et al. [24] & Activity recognition based on the motion signals (accelerometer and gyroscope). & Converted the signals into frequency images and applied CNN models for recognizing activities. & The model cannot differentiate closely related activities. \\ \hline [PERSON] et al. [36] & Identifying anomalies based on the number of activities performed each day. & Identified anomalies by considering missing or excess subevents and an unusual duration of an activity using the H20 autoencoder. & Works well for single residents while not tested for multiple residents; ground truths were generated, but not validated. \\ \hline [PERSON] et al. [15] & Classifying human behavior anomalies by utilizing the Internet of Medical Things and smart homes. & Applied the HMM model for identifying anomalies where data were collected from the authors’ set test bed. & HMM works well when the hidden states are few and requires effective feature engineering for better performance. \\ \hline \hline \end{tabular}
\end{table}