# Location Based Indoor and Outdoor Lightweight Activity Recognition System
## 5 Discussion  
During this manuscript we have proposed an innovative solution in order to address the task of recognizing users' activities with a minimal infrastructure: a mobile application installed in an smartphone or smartwatch and some BLE beacons. Our approach has advantages and disadvantages. On the positive side, our system is minimally intrusive and very cost-effective. The patients do not need to incorporate any additional device to their routine, using only the smartphones that they already own and some non-intrusive beacons. In this way, we do not impose additional burdens to the users and they use a device that are already familiarized with. This approach obviously has its drawbacks. Using only the inputs gathered from the smartphone limits the richness of the data available to model the behavior of the users, since there are some activities that cannot be recognized without additional sensors in the patients' homes (have a shower, wash the dishes, etc.). Also, using GPS data to analyze the places the user is visiting to later infer their activity has a limitation, multi-story buildings where different amenities may share the same GPS coordinates. However, even with this limitations, this approach could allow researchers to analyse people's daily habits in search of behavioral patterns using the activities performed by the user (that our system has been able to recognize) during days or even months. Several studies have already verified that analysing people's out of home behavior (which activities they perform, which are their mobility patterns, etc.) could provide insights about their cognitive status [56; 57], quality of life [58] or even mood [59]. As we have already explained in Section 3.2, one of the most important obstacles we have faced is the quality of the GPS data. Even though in most of the cases its quality is acceptable, when issues such as the static jumps or GPS drifts appear we may have the risk of detecting activities that have not occurred. To address this issue, we have developed a data cleaning system that is able to handle most of the GPS quality problems we have detected so far. However, this does not mean that new problems that we have not been able to identify may surface. Therefore, the data cleaning process is an essential part of the system that we should continue to improve. Regarding the developed activity recognition system, we chose OSM because of its flexibility and open data policy, allowing us to analyze almost in real time each of the places that users visit without any additional cost. However, since OSM is a collaborative project supported by volunteers, it also has some limitations: less densely populated or less traveled areas may not have enough annotated places or the annotations are outdated. Figure 29: Example of indoor environment with one or more BLE beacons for each room. In this field, Google Maps has the largest and probably best dataset of annotated places. However, it has one major drawback, its cost. Google charges per each query to collect the nearby places to a coordinate. One possible way to avoid this would be to use the Google Takeout service, where Google allows us to download all the location data they have about us. Still, this would add additional burden to the users since this is an information that must be requested by the user and then sent to the researchers for further analysis and therefore not allowing its analysis in real time. However, even though using the Google Takeout service would not allow us to analyze in real time users' activities, it could be very useful to use that service to generate a test dataset with which we could perform an extra evaluation of our POI identification system, comparing their performance and learning new aspects that we could improve.