{'fraction_non_alphanumeric': 0.0391489597166888, 'fraction_numerical': 0.0283311199645861, 'mean_word_length': 5.219029593943565, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Human Activity Recognition using Inertial, Physiological and Environmental Sensors: a Comprehensive Survey

In the last decade, Human Activity Recognition (HAR) has become a very important research area, especially due to the spread of electronic devices such as smartphones, smartwatches and video cameras present in our daily lives. In addition, the advance of Deep Learning (DL) has led researchers to use HAR in various domains including health and well-being applications. HAR is one of the most promising assistive technology tools to support elderly's daily life. However, this class of algorithms requires large amounts of data. Furthermore, not all the HAR application fields generate a significant amount of data and not all of them provide the computational power that DL models in HAR require. This survey focuses on critical applications of Machine Learning (ML) in the fields of HAR, largely oriented to Daily Life Activities by presenting an overview of the publications on HAR based on ML and inertial, physiological and environmental sensors.


INTRODUCTION
HUMAN ACTIVITY RECOGNITION (HAR) has become a popular topic in the last decade due to its importance in studying many areas, including health care, interactive gaming, sports, and monitoring systems for general purposes [93]. HAR aims to recognize human activities in controlled and uncontrolled environments. Despite myriad applications, HAR algorithms still face many challenges, including 1) complexity and variety of daily activities, 2) intra-subject and inter-subject variability for the same activity, 3) tradeoff between performance and privacy, 4) computational efficiency in embedded and portable devices, and 5) difficulty of data annotation [93]. Data for training and testing HAR algorithms is typically obtained from two main sources, 1) ambient sensors (e.g. a security camera), and 2) embedded sensors (e.g. accelerometer on a smartwatch or standalone sensors). Ambient sensors can be environmental sensors or video cameras positioned in specific points in the environment [105,212].
Embedded sensors are integrated into personal devices such as smartphones and smartwatches or are integrated into clothes or other specific medical equipment [82,103,128,168]. Cameras have been widely used in the HAR applications, however collecting video data presents many issues regarding privacy and computational requirements [57]. While video cameras produce rich contextual information, privacy issues limitations have led many researchers to work with other ambient and embedded sensors, including depth images as a privacypreserving alternative. In terms of algorithmic implementation, HAR research has seen an explosion in Deep Learning (DL) methods, resulting in an increase in recognition accuracy [82,212]. While DL methods produce high accuracy results on large activity datasets, in many HAR applications Classic Machine Learning (CML) models might be better suited due to the small size of the dataset, lower dimensionality of the input data, and availability of expert knowledge in formulating the problem [95]. The increasing interest in HAR can be associated with growing use of sensors and wearable devices in all aspects of daily life, especially with respect to health and well-being applications. This increasing interest in HAR is evident from the number of papers published in the past five years, from 2015 to 2019. As Figure 1.(a) shows, among a total of 149 selected published papers on HAR, 54 were based on DL models, and 95 were based on CML models. During the same time period were published 46 surveys and 20 articles proposing not ML-based methodologies (e.g., threshold models). Instead, Figure 1.(b) shows the average activity recognition accuracy, among the 54 DL-based papers and the 95 CML-based papers, that as visible (92.4% DL-based and 92.6% CML-based) present almost the same recognition quality. However, to note that the number of CML-based papers is higher than that of DL-based papers. In addition, Figure 2 shows the distribution of the published HAR papers over the past five years in terms of (a)CML and (b) DL models. It shows that the number of CML-based HAR models was, except 2019, greater than the number of DL-based HAR models. For this reason, in this paper, we will review both DL-based and CML-based models. We will also limit our review to non-image-based sensors, to manage the scope. Interested readers are encouraged to read references on vision-based HAR models [57,101,185,193]. In particular, HAR can have a myriad of health and well-being applications, especially in older population. According to the 2019 World Population Prospectus [52], in 2018, for the first time in human history, persons aged 65+ years outnumbered children under 5 years. In addition, they expect that in 2050 people aged 65+ years (1.5 billion) will outnumber adolescents and youth aged 15 to 24 years (1.3 billion). This substantial increase in the elderly population has profound implications for the planning and delivery of health and social care. In fact, despite an increase in life expectancy, most people show a loss of self-efficacy as they age, and a consequent reduction of the quality of their life. This is particularly true for elderly affected by neurodegenerative diseases (e.g., dementia, Alzheimer and Parkinson), where progress in medicine enables longevity usually at the expense of autonomy and independence [5,64]. This decrease in autonomy in conjunction with necessity of changing some habits and of acquiring new behaviors (e.g., taking medicine at periodic intervals) with respect to activities of the daily file (ADLs) requires innovative use of new technologies such as HAR. The growing demand for healthcare services implies a range of challenges in medicine and technology, which, if resolved, could benefit our global society and economy. The usage of Information and Communication Technology (ICT) for achieving self-sufficient and proactive healthcare services will be very beneficial. Nowadays, patient-driven healthcare, in combination with web-based platforms and electronic health records, has already led to an improvement in the healthcare system. In recent years, many smartphone apps, which are becoming available for physiological status monitoring, have become very popular [65,120,159]. With modern improvements in sensor networks research, we are on the path of revolutionary low-cost healthcare monitoring systems embedded within the home and daily life environment [24,81]. In this scenario, HAR becomes one of the most promising solutions to assist older people's daily life and one of the most used technologies in health care delivery [188]. For example, HAR can be used to monitor physical and cognitive function of elderly through monitoring consistency of their daily activities or can be used to prompt if certain essential activities are not performed, e.g. taking medicine, hydrating, physical activity, among many other examples. Figure 3 presents the proposed workflow in designing HAR-based methodologies. When developing HAR-based application, the first phase is to determine the type of sensor and device that is used to collect data (device identification). The second phase is to determine the details of the data collection process, including the annotation process and possibly any necessary preprocessing (data collection). The third phase includes identifying the appropriate machine learning model and training the model, typically a supervised machine learning model on  annotated data (model selection and training). However, as shown in Fig.3 (indicated by the backwards arrow), the selected model can also influence the pre-processing data phase. In the final phase, the model is evaluated in terms of the activity recognition metrics such as accuracy. In this work, we use accuracy as a comparison metric between the various articles due to the fact that it is the only common metric for all of them. Not all articles present the results obtained in terms of precision, recall, sensitivity, F1-Score, Area Under The Curve (AUC) or Receiver Operating Characteristics (ROC) curve. Using this workflow as a reference, this paper provides an overview of the state of the art in HAR by examining each phase of the process. The rest of the paper is organized as follows: Section 2 provides a brief overview of the existing surveys on HAR from 2015 to 2019, Section 3 describes the article selection criteria, Section 4 will provide background material on CML, DL, and existing sensors/wearable devices. Section 5 will introduce the definition of human activity, followed by categorization of the published works in terms of sensor and device (Section 6). Section 7 will present available datasets for HAR research activity. Section 8 will review published papers based on the model and evaluation metrics. Section 9 will discuss the limitations and challenges of existing HAR research, followed by concluding remarks in Section 10.

EXISTING SURVEYS
Since HAR is emerging as an important research topic, many surveys have been published in the past few years. Among the initial 293 published papers that we identified, 46 were survey papers published since 2015. The existing survey papers can be categorized based on the data sources and the activity recognition algorithm. The most widely used data sources are: a) inertial, physiological and environmental devices and b) video recording devices. In terms of the HAR algorithm, most algorithms are based on CML models and more recently DL algorithms. Among such 46 survey papers, we excluded 23 papers which were exclusively video-based HAR papers. Our survey paper provides unique contribution to the review of literature, a broad vision of the evolution of research in the context of the HAR in the last 5 years, placing at the center of this contest not so much the algorithmic part, as regards the recognition of activities, but focuses on clearly visualizing how data sources (aka sensors and devices) are used in this context. We are particularly interested in accelerometer sensors because they have shown excellent results in HAR applications and because their use in conjunction with other sensors is rising rapidly. The proliferation of accelerometer sensors is strongly related to their ability to measure directly the movement of the human body. In addition, using accelerometer sensors is affordable, and the sensors can be integrated into most wearable electronic objects people own.
Recently, Wang. J and colleagues [188] (2019) survey existing literature based on three aspects: sensor modality, DL models, and application scenarios, presenting detailed information of the reviewed works. Wang. Y and colleagues [195] (2019) present the state-of-art sensor modalities in HAR mainly focusing on the techniques associated with each step of wearable sensor modality centered HAR in terms of sensors, data pre-processing, feature learning, classification, activities, including both conventional and DL methods. Besides, they present the ambient sensor-based HAR, including camera-based, and systems combining wearable and ambient sensors. Sousa et al. [166] (2019) provide a complete, state-of-art outline of the current HAR solutions in the context of inertial sensors in smartphones, instead, Elbasiony et al. [58] (2019) introduces a detailed survey on multiple HAR systems on portable inertial sensors (Accelerometer, Gyroscopes, and Magnetometer), whose temporal signals are used for modeling and recognition (ML techniques) of different activities.
Furthermore, Table 1 summarizes all the aforementioned 23 surveys on human activity recognition methods sorted by chronological order from 2019 to 2015. It should be noted that all these surveys, including those not taken into consideration (video-based), had not reported their systematic review process (e.g., using Preferred Reporting Items for Systematic reviews and Meta-Analyses (PRISMA)). Therefore, Columns Six and Seven, present respectively the approximate start/end publication year of the reviewed papers and the approximate number of reviewed articles. Most of these HAR reviews focus on data management methods and activity recognition models. To the best of our knowledge, no existing survey article is (1) presenting a comprehensive meta-review of the existing surveys, (2) providing a comprehensive overview of different sensors, (3) reporting and comparing performance metrics, and (4) reporting on dataset availability and popularity.

SELECTION CRITERIA
We used Google Scholar to search for studies published between January 2015 to September 25, 2019. All searches included the term "human activity recognition, " or "HAR" in combination with "deep learning", "machine learning, " "wearable sensors, " and "<name> sensor 1 ". All these published papers where found by using the combination of keywords mentioned above. Our keywords produced a total of 249,110 records, among which we selected 293 Table 2. Distribution of the selected published articles for year by including the following keywords: "Human Activity Recognition (HAR), Sensor <Name>, Wearable sensors".
Year Total # of Papers  2015  52  2016  60  2017  45  2018  90  2019  46  Total  293 based on the quality of the publication venue. The chosen articles were selected from the following publishers: Institute of Electrical and Electronics Engineers (IEEE), Elsevier, and Sensors. The average number of citations was 46, and the distribution of the papers for each year is shown in Table 2. Figure 4 shows our retrieval process based on PRISMA template for systematic reviews [123]. Initially we removed all surveys papers and not accessible papers ( e.g., pay to access) (91 excluded). Next, we excluded all books (4 excluded) and all vision-based papers (31 excluded). Finally, we excluded all the papers that do not use accelerometers (4 excluded), and all the papers performing activity recognition, such as swimming, riding horses, driving, publications prior to 2015, and papers using non-machine learning techniques such as simple thresholding (4 excluded). As a result, 149 were eligible, as Figures 1 and 4 show.

BACKGROUND
This section will introduce basic concepts of ML, DL, and wearable / environmental sensors market evolution.

Machine Learning Overview
Machine Learning (ML) is a branch of artificial intelligence (AI), for developing algorithms to identify and infer patterns given a training dataset [23]. Such algorithms fall into two major classes: • Supervised learning • Unsupervised learning The goal of supervised learning is to create a mathematical model based on the relationship between input and output data. and to use the model for making prediction on future unseen data points. In unsupervised learning, the goal is to identify patterns in input data without any knowledge on the output [105]. Typically one or more pre-processing steps will be also required, including feature extraction, vectorization, normalization or standardization, and projection. [56].

Deep Learning Overview
In recent years, DL algorithms have become popular in many domains, due to their superior performance [105].
Since DL is based on the idea of the data representation, such techniques can automatically generate optimal features, starting from the raw input data, without any human intervention, making it possible to identify the unknown patterns that otherwise would remain hidden or unknown [161]. However, as already introduced, DL models present some limitation [115]:

Sensors and Wearables
Sensors and wearable devices surround us in our daily life. The most common type of sensors used in activity recognition are accelerometers, mainly due to their small size and low cost. Figure 5 illustrates the prevalence of accelerometer sensors in HAR. The other types of sensors used in HAR in health-related applications include gyroscopes, magnetometers, compasses, pressure sensors, body temperature sensors, electromyography, oximetry sensors, and electrocardiographs. Many other kinds of sensors have been used in different applications. For example, the Global Positioning System (GPS) sensors or WiFi are used to determine the user's location [88], microphones and Bluetooth are used to analyze human interactions [106], and CO 2 sensors are employed to estimate the air quality [97]. The size of these sensors are constantly decreasing, such that they are being integrated into clothes [213], smart glasses [68] and other wearable objects [98]. In more advanced applications, objects in the daily environment are enriched with Radio Frequency Identification (RFID) tags. The tags make it possible to infer the user's in-house activities (e.g., preparing coffee, doing laundry, washing dishes) [192].
The distribution of the variety of sensors in our daily life environment and our Daily Life Objects (DLO) generates data that can be used in HAR [147]. Shipments of wrist-worn wearables, including smartwatches, basic watches, and wrist bands, reached 34.2 million units during the second quarter of 2019 (2Q19), up 28.8% year over year, according to data from the International Data Corporation (IDC) Worldwide Quarterly Wearable Device Tracker. The top five companies -Xiaomi, Apple, Huawei, Fitbit, and Samsung -continued to push forward with new products and promotional campaigns during the quarter, collectively capturing 65.7% of the market, an almost 12-point gain from last year [2]. As stated in [2], the quantity of smartwatches has been growing rapidly, and such smart devices are trendy worldwide. With all these developments, technology provides the scientific community new ways to make life more manageable, secure, faster, and better in general. Smart devices lend themselves to increasingly complex innovations in sensing and actuation. For example, when acceleration and inertial sensors are available, HAR algorithms can be implemented. Furthermore, by including additional electronic modules, such as Bluetooth Low Energy (BLE) and Wireless Local Area Network (WLAN) antennas or GPS, wearable devices can be used for real-time alerting and determining location to report risky situations and identify activity [51]. In addition to smartphones and smartwatches, other types of data collection and sensing systems with communication capabilities are adding to the Internet of Things (IoT).

HUMAN ACTIVITY
The definition of Activities of Daily Life (ADL) is broad. ADL's are the activities that we perform daily, such as eating, bathing, dressing, working, homemaking, enjoying leisure and all of these activities involving physical movement. Our review of HAR scientific literature presents an overview of the most studied ADL's. Among all ADL's, the most popular activities in HAR research are walking, running, standing, sitting, walking upstairs and walking downstairs. However, other type of activities have been explored in the past few years, including complex activities, such as the different phases of cooking [109], house cleaning [13,104,105,109], driving [20,21,164,206], smoking [11], swimming [26], or biking [3,155,168,206]. A number of studies focus on specific locations, such as sitting on the ground, lying on bed [14,191,201], walking/standing in the elevator [16,42,191,220], walking/running on a treadmill, walking in a parking lot or exercising on a stepper [191], or exercising on a cross trainer [116,191]. Other detailed movement recognition involves specific movements of the arms, such as reaching for an object, frontal elevation, carrying/reaching an object, releasing it, and other activities that people can perform in relation to other objects [69,171,172]. A major area of HAR research involves the aging of population and the increasing of the number of people with physical and cognitive diseases. Many HAR models are being used to help users recognize and avoid risky situations, such as falls in elderly people [34,54,117,118,126,173,178] or Freezing of Gait (FoG) in Parkinson's disease [50]. Furthermore, activity tracking devices are becoming very popular for monitoring ADLs. Those devices are able to approximate physiological and physical parameters such as heart rate, blood pressure,  steps, level changes, and calories consumed. The more advanced devices are able to recognize sleeping and the neurological phases of sleep (i.e., cycling through nREM (stages 1-4) and REM) [38]. All the information collected by such devices can be used as input to HAR algorithms.

DATA SOURCE DEVICES IN HAR
This section discusses the diversity of data sources used in the HAR algorithms. Small, low-cost and non-invasive sensors such as accelerometers, gyroscopes, and magnetometers, as shown in Figure 5.(a), are the most commonly used sensors in HAR. As depicted in Fig. 5.(a), 149 papers used accelerometers, 83 used gyroscopes in addition to accelerometers, and 27 used a magnetometer in addition to the accelerometer. Therefore, all the selected papers use at least one accelerometer and at least one of such sensors or their combination. Furthermore, Figure 5.(b) shows the average activity recognition accuracy obtained form combination of such device.  Table 3 and Table 4 respectively show the sensor/device type and provide references to the papers using such sensors/device. Besides, Table 3 and Table 4 show in Columns Three to Five, the average number of recognized activities, average number of tested datasets and the average number of testing subject. These tables illustrate the importance of sensors like accelerometer, gyroscope, and magnetometer. However, other type of sensors as environmental sensors (temperature [48,70,82,104,117,171,205], humidity [48,117], light [94,104], presence [205]), radio signals (WiFi and Bluetooth [21,48,180]), medical equipment ( Electrocardiogram (ECG) [69,180], Electromyography (EMG) [16]) or other type of build in sensors (GPS [3,44,48,82,94,143,181], compass [143,181], heart rate [17,70,112,151], barometer [26,54,220], stretch [20,132], audio [21,94,130,181]) are common in HAR.
In addition to the direct measurements that such sensors provide, the indirect usage of the measurements in form of smart metrics is promising (e.g., energy harvesting of the system [84] or the Received Signal Strength Indicator (RSSI) [180]) in order to recognize human activity related to direct measurements from the body or environmental variations. Furthermore, the importance of smartphones and smartwatches in HAR is increasingly clear, mainly due to their explosion among consumers and given that these devices currently contain many of the aforementioned sensors. Finally, as shown in Figure 6.(a), among all the reviewed published papers, the  proposed HAR methods are based mostly on standalone devices. However, the total number of smartphoneand smartwatch-based methods are higher than those based on standalone devices. Figure 6.(b) shows that in terms of recognition accuracy methodologies based on smartphone and smartwatch devices are in line with those obtained from standalone devices. Also, smartphones and smartwatches [87], unlike standalone devices, provide computational capabilities that make it possible to directly execute HAR models on the wearable device, and in many cases they have a very high cost (e.g. devices used in the medical field).

DATA
In the previous chapter we introduced the devices of greatest interest in HAR. In this chapter we discuss about the type of data they provide in relation to the environmental and human context. Basically, human-related collected data in HAR can mainly be categorized as follows: • Environmental sensors data; • Inertial sensors data; • Physiological sensors data.

Physiological Sensors Data
Physiological sensors provide the measure of physiological signals. In contrast with other sources of emotional knowledge (facial, gestures, and speech), physiological signals give important advantages; they are mostly involuntary and, as such, are quite insensitive to deception, they can be used to measure the affective events continuously [62]. The best-known physiological data are brain electrical activity, heartbeat electrical activity, muscles electrical activity, heart rate, blood pressure, and skin conductance acquired by the following external data acquisition system: Electroencephalogram (EEG), Electrocardiogram (ECG) and Electromyography (EMG).

Environmental sensors data
The environmental data covers all the collection of data representing the state of the environment. Data generally used to represent the environment state are temperature, humidity, pressure, and brightness. However, measuring the status of the environment goes beyond this data. It is also related to the people present in the environment and the objects inside it. For example, knowing the number of people inside the environment and their position or knowing the position and the actions performed over a certain object inside the environment would be very useful in many application scenarios related to human assistance, healthcare, and service delivery. Table 5 shows the categorization of the revised articles based on the type of data, where Column One and Two show the data type and the reference to the articles using such data types. Columns Three to Five respectively show the average number of recognized activities, average number of tested datasets, and average number of testing subjects. However, as we discussed earlier, the largest amount of data on daily life is collected via electronic devices, such as smartphones, smartwatches, activity trackers, smart thermostats and video cameras. As shown in Figure 6, the use of smart devices like smartphone and smartwatch is outnumbering the use of standalone devices. It should be noted that the standalone column identifies all those devices other than smartphones and smartwatches as for example, clinical and dedicated instruments, such as Actigraph (Actigraph, Florida/USA), a Bioharness3 (RAE Systems by Honeywell, California/USA), or iPod (Apple Inc, California/USA). Furthermore, during the data collection step, sometimes activities are performed in a controlled manner (aka scrippted). That is because human movement patterns are very hard to recognize due to the large inter-subject and intra-subject variability. Such variability entails a considerable difficulty in developing a methodology that manages to generalize among all subjects. Also, the lack of data collected from a very large number of subjects does not help researchers find a solution to this problem. Table 6 shows some of the best known and open source datasets for HAR studies. Column One refers to the name and the article proposing the dataset. Column Two presents the activity labeled in the dataset, Column Three shows the number of activities. Column Four shows the number and type of the used sensing devices. Column Five and Column Six show the number of subjects from whom the data was collected and the number of citations that the dataset received by September 25, 2019. Such datasets are largely based on accelerometer, gyroscope, and magnetometer sensor data. Most of such sensors are embedded into smartphones and smartwatches, and the number of activities in these datasets ranges from two [15] to thirty-three [18], as shown in Table 6. The most common studied activities are primary activities of daily life, such as walking, running, sitting, standing, walking upstairs, walking downstairs, and sleeping.

CLASSIFICATION MODEL AND EVALUATION
The third and fourth step of the HAR workflow includes identification and evaluation of the classification model that is used for activity recognition. As shown in Figure 1 and Figure 2, CML models still enjoy great popularity compared to those based on the relatively more recent and more advanced models such as the DL models. We point out that many articles made use of different classification models and not just one model for achieving better performance, and as mentioned in Section 1 we use accuracy as a comparison metric between the various articles. This beacouse accuracy is the only common metric among them.

Deep Learning (DL) based methodologies
The DL models, as shown in Figure 1 comprised 54 papers of the 149 papers we reviewed. Figure 7 shows (a) the distribution of DL models among the 54 articles, (b) the average accuracy, and (c) the average number of recognized daily life activities for each model. The most popular model is the Convolutional Neural Network (CNN), which was referenced in 30 papers [7,22,34,55,66,69,74,75,79,80,82,94,99,127,131,133,138,148,153,157,158,174,190,203,205,210,218,220,222,223]. The CNN models obtained an average accuracy of 93.7% in activity recognition over an average number of 11 activities of daily life. The second most used model was the Long Short-Term Memory (LSTM) model, which was used in 17 papers [35,40,67,70,82,99,119,125,126,137,142,158,167,174,177,211,217]. It obtained an average accuracy of 91.5% over an average number of 17 activities of daily life. Other models that were used are the Recurrent Neural Network (RNN) [70,77,125,128,142,158,180,194], Extreme Learning Machine (ELM) [131,174], with, respectively 8 and 2 papers with an average accuracy of 95% and 87.5%. Furthermore, such models were tested over an average number of 14 and 12 activities, respectively. Finally, the rest of the papers (indicated by Other in Fig.7) where based on models such as Autoencoders [6,191], Inception Neural Networks (INN), or the other frameworks [8] for a total of 7 papers with an average accuracy of 91.1% and an average number of 17 activities of daily life.
The second most used model is the classical k-Nearest Neighbor (kNN) model [4,13,14,17,27,44,49,60,76,102,104,105,112,117,140,154,162,168,172,179,182,187,221], which was used in 23 papers, achieving an average accuracy of 93.7% over an average of 12 activities of daily life. The third and fourth most used model are the Decision Tree (DT) model [4,17,29,30,47,49,60,87,141,146,151,154,162,168,172,178,183,198,207,208], which was used in 19 papers, obtaining an average accuracy of 94.2% over an average of 8 activities of daily life, and the Random Forest (RF) [14,16,17,44,47,54,112,117,118,135,143,160,168,172,198], which was used in 15 papers, obtaining an average accuracy of 93.3% over an average of 10 activities of daily life. The fifth most used model is the Neural Networks (NN) [4,32,44,49,60,105,108,130,154,172,175,184,198,207], which was used in 14 papers, obtaining an average accuracy of 93.5% over an average of 8 activities of daily life.

DISCUSSION
In this paper, we provided an overview of the current HAR research. HAR is a critical research area in activity recognition, pervasive computing, and human assistive environments. In the last decades, with the rise of new technologies and with growing needs such as aging population, HAR is becoming even more essential. In recent years, DL-based HAR methods have produced excellent results in terms of recognition performance. However, CML-based approaches are still widely used, and they generate outstanding results without the computational costs.

Available datasets
Not-available datasets # of papers Fig. 9. Availability of datasets used to evaluate the proposed methodologies.
In recent years, reproducibility of machine learning models has become increasingly important. Based on our results, for at least 78% of the proposed HAR methodologies, the results are not fully reproducible due to proprietary datasets. This results in barriers for the research community for the identification of the best models and benchmarking the results. As shown in Figure 9 2 , among a total of 142 datasets, only 30 datasets are publicly available (a few examples are shown in Table 6). Furthermore, the lack of public heterogeneous datasets reduces the possibility of creating HAR models with better generalization capabilities. This is because the data used in the investigated papers are collected primarily in a controlled environment. This problem is exacerbated by the inter-subject and intra-subject variability absent in such scripted datasets, as most proposed HAR models are only tested on a limited number of activities and captured in a single controlled environment. As shown in Figure 10, we found that 28 HAR models were tested on two datasets, 21 HAR models on three datasets, less than 10 HAR models on 4-6 datasets, and only one paper [78] tested on a total of 14 datasets. Among the 149 analyzed HAR models, 87 models were tested on a single dataset, with the remaining 62 tested on more than one dataset. This situation shows the challenge of identifying a methodology superior to the others.
Another significant issue concerns the interpretability of the results, mainly related to papers presenting similar methodologies and tested on the same dataset, claiming to achieve almost the same results in terms of activity recognition accuracy. Such an issue is related to tests performed using commercial tools, lack of open source code, and authors who do not publicly provide their source code. Besides, the heterogeneity of the data and the definition of a HAR methodology that can recognize the activities carried out by people with different physical and motor characteristics collides with the data sources used for data collection. As we have seen, a variety of sensors and devices are used for data collection. However, the proposed methodologies are usually very rigid regarding the data source. Specifically, it becomes difficult to have a methodology tested on a particular individual by making use of a particular sensor(s) and subsequently changing the sensor model. Various sensors have different technical characteristics, which also entail their specific state, e.g., the measurement error or the noise that a specific sensor presents.
Regarding the HAR models, Figure 7 and Figure 8 show that CML models are still used more widely than complex DL-based models. This is because CML models require a smaller amount of training data, as well as lower computational requirements. In addition, DL models are inherently difficult to interpret. Nonetheless, DL models have a unique ability to recognize more complex activities, while maintaining high accuracy. In addition, they do not require a data pre-processing stage. Figure 11 shows a suggested workflow for developing HAR applications based on: • the number of activities to be recognized, • the amount of available (labeled) data, • local or remote computation.
We observed that the selection of the precise DL or CML model is primarily based on the computational requirements and the amount of available training (labeled) data. In terms of the sensors, the most widely-used used, if not indispensable, sensor is the accelerometer, which can be used in conjunction with other sensors such as the gyroscope or the magnetometer.

CONCLUSION
This paper surveys the existing literature on Human Activity Recognition (HAR). Starting from a meta-review of the existing surveys on HAR, we analyzed the reviewed literature based on the most-widely studied human activities, the most used electronic sensors as the data source, and the best-known devices that integrate with these sensors. We discussed datasets primarily in the literature, emphasizing datasets that are publicly available. Finally, we presented a description of the recognition models most used in HAR. For this purpose, we have presented the most widely-used DL and ML models and their results, both from the point of view of quality (accuracy) and quantity (number of recognized activities). In particular, we concluded that HAR researchers still prefer classic ML models, mainly because they require a smaller amount of data and less computational power than DL models. However, the DL models have shown a more capacity in recognizing a large number of complex activities. Future work should focus on the development of methodologies with more advanced generalization capabilities and recognition of more complex activities.