An Unsupervised Learning-Based Spatial Co-Location Detection System from Low-Power Consumption Sensor †
Abstract
:1. Introduction
- Proposal of a cloud computing and unsupervised learning-based system for inferring spatial co-location of people from magnetometer data.
- Performance evaluation and analysis of the convolutional-autoencoder model for spatial co-location detection.
2. Related Work
3. Proposed Method
3.1. System Model
3.2. Spatial Co-Location Detection Procedures
- Data pre-processing.
- (a)
- The first three basic data pre-processing steps, proposed in [8], were implemented:
- Calculating the total intensity:Due to the fact that mobile magnetometer readings are influenced by the device orientation, we first need to reduce the three-dimensional earth magnetic field readings into one scalar value, the total intensity (F). The total intensity can be found by calculating the distance between the horizontal intensity (H) and the vertical intensity (), while the horizontal intensity is given by the square root of the sum of the squares of the true north () and the true east () as can be seen in Equation (1).Thus, is and would be equal to . i denotes ith user’s device while k represents kth data point.
- Downsampling the total intensity:Each of the mobile magnetometer readings normally has various frequencies. To generate the training and test data, we would need to use the same frequency for all the data. This can be done by downsampling the total intensity of each device () into 250 ms bins, where each new value was computed by averaging the values of the timestamps. This step would also reduce the noise, thus increasing accuracy.
- Normalizing the total intensity:Next, the total intensity (F) was normalized such that all values are within the range of 0 and 1 to increase the model accuracy. The normalization method is formally defined in Equation (2).
- (b)
- Rescaling total intensity :After calculating the total intensity , downsampling F and normalizing it, we calculate the tenth root of each device’s normalized total intensity () as can be seen in Equation (3).This step was implemented in order to reduce a wide range of values, thus avoiding having a flat plot as well as exposing small changes in the data.Figure 4 illustrates the difference between with and without applying the tenth root operation to . Both groups of images were generated from the same magnetometer readings. However, images in Figure 4b tends to look flat due to a wide range of values caused by outliers whereas in Figure 4a, small changes in the data are more exposed. This will help our model to learn more useful properties from the training images as well as discriminating test data. Normally, we would like to use a logarithmic scale to accomplish this task; however, since is undefined and where would give us a steep negative slope, we decided to use another scaler that would yield similar result to a logarithmic scale—the tenth root.
- (c)
- Generating training data:Before training our convolutional autoencoder model, we need to first generate training images instead of the training matrix which was proposed in [8], as illustrated in Figure 5. Execution steps for generating training images are as follows:
- Generate a 32 by 32 pixels greyscale image from the first 2 min data.
- Sift by one data point.
- Generate the next 32 by 32 pixels greyscale image from these 2 min data (after shifting by one data point) and repeat the proses until the end of 5 min window data . This will generate 725 training images since unlike the previous approach in [8], we do not need to repeat step i to iii for 10 times.
There are two kinds of training images that were generated as shown in Figure 6—with and without filling up the area under the line. Our test images were also generated in the same way. By filling up the area under the line, we wish to make it more difficult for the model to reconstruct the test data as the image will have more non-zero values, thus being more decisive in distinguishing between earth’s magnetic data from the same location and earth’s magnetic data from different locations.
- Training the Co-location detector.After the training data were generated using the subject’s trajectory, we feed this data into our convolutional autoencoder model inside the Co-location detector and train it. MSE was used as the objective function, which is formally defined as Equation (4).
- Feeding other users data.After the training process is over, we feed other users’ data as test data into the model and analyze the SSIM index, which is formally defined as Equation (5).
4. Performance Evaluation
4.1. Dataset
- Earth’s magnetic x positive north () in
- Earth’s magnetic y positive east () in
- Earth’s magnetic vertical intensity z () in
4.2. Evaluation Procedures and Implementation
- We used magnetometer data collected from Samsung Galaxy S6 edge to generate our training data. Therefore, we assumed that this device belongs to the subject.
- We trained our convolutional autoencoder model using the generated training data.
- We then generate the test data using magnetometer data collected from the other two devices—Samsung Galaxy tab S5e and Samsung Galaxy S6 edge.
- Test data were generated by copying two minutes data, sifting by 240 data points (one minute), copying the next two minutes data, and repeating the process for a certain interval.
- A total of 18 test data were generated from two devices—nine test data each. This consisted of eight test data from the same location and ten test data from different locations.
- As shown in Figure 7, all the data were collected together while the observers were doing three different activities, namely walking, waiting for the subway, and in the subway. This indicates that the observers were always moving during the data collection activities. The only time when the observers did not move was when they waited for the subway. Since the maximum waiting time of the subway in Busan (South Korea) is five minutes, we generate different locations test data based on the minimum of five minutes difference from the training data. We assumed that by this time, the test data were collected from different places.
- Finally, we analyzed the SSIM index to infer the co-location of these three devices. Moreover, we calculated the F1 score and generated confusion matrices to visualize the performance of our proposed system.
4.3. Result and Analysis
4.3.1. Without Filling Up the Area under the Line
4.3.2. Filling Up the Area under the Line
5. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
SSIM | Structural Similarity |
MSE | Mean Squared Error |
References
- Sundaram, V.M.; Thnagavelu, A.; Paneer, P. Discovering co-location patterns from spatial domain using a delaunay approach. Procedia Eng. 2012, 38, 2832–2845. [Google Scholar] [CrossRef] [Green Version]
- Wan, Y.; Zhou, J.; Bian, F. CODEM: A novel spatial co-location and de-location patterns mining algorithm. In Proceedings of the Fifth International Conference on Fuzzy Systems and Knowledge Discovery, FSKD 2008, Jinan, China, 18–20 October 2008; Volume 2, pp. 576–580. [Google Scholar] [CrossRef]
- Yu, W. Spatial co-location pattern mining for location-based services in road networks. Expert Syst. Appl. 2016, 46, 324–335. [Google Scholar] [CrossRef]
- Yao, X.; Chen, L.; Peng, L.; Chi, T. A co-location pattern-mining algorithm with a density-weighted distance thresholding consideration. Inf. Sci. 2017, 396, 144–161. [Google Scholar] [CrossRef]
- Zhang, H.; Chen, J.; Li, W.; Song, X.; Shibasaki, R. Mobile phone GPS data in urban ride-sharing: An assessment method for emission reduction potential. Appl. Energy 2020, 269, 115038. [Google Scholar] [CrossRef]
- Nguyen, K.A.; Watkins, C.; Luo, Z. Co-location epidemic tracking on London public transports using low power mobile magnetometer. In Proceedings of the 2017 International Conference on Indoor Positioning and Indoor Navigation, IPIN 2017, Sapporo, Japan, 18–21 September 2017; Volume 2017, pp. 1–8. [Google Scholar]
- Eide, A.H.; Dyrstad, K.; Munthali, A.; Van Rooy, G.; Braathen, S.H.; Halvorsen, T.; Persendt, F.; Mvula, P.; Rød, J.K. Combining Survey Data, GIS and Qualitative Interviews in the Analysis of Health Service Access for Persons With Disabilities; BioMed Central Ltd.: London, UK, 2018. [Google Scholar] [CrossRef] [Green Version]
- Kosasih, D.I.; Lim, H.; Lee, B.G. Co-location Detection System Using Mobile Magnetometer Data. In Proceedings of the International Conference on ICT Convergence, Jeju Island, Korea, 21–23 October 2020; pp. 1833–1838. [Google Scholar]
- He, Z.; Deng, M.; Xie, Z.; Wu, L.; Chen, Z.; Pei, T. Discovering the joint influence of urban facilities on crime occurrence using spatial co-location pattern mining. Cities 2020, 99, 102612. [Google Scholar] [CrossRef]
- Sitanggang, I.S.; Roseli, S.; Syaufina, L. Spatial Co-Location Patterns on Weather and Forest Fire Data. Int. J. Inf. Technol. Comput. Sci. 2018, 10, 13–20. [Google Scholar] [CrossRef]
- Ferretti, L.; Wymant, C.; Kendall, M.; Zhao, L.; Nurtay, A.; Abeler-Dörner, L.; Parker, M.; Bonsall, D.; Fraser, C. Quantifying SARS-CoV-2 transmission suggests epidemic control with digital contact tracing. Science 2020, 368, eabb6936. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hernandez-Orallo, E.; Manzoni, P.; Calafate, C.T.; Cano, J.C. Evaluating How Smartphone Contact Tracing Technology Can Reduce the Spread of Infectious Diseases: The Case of COVID-19. IEEE Access 2020, 8, 99083–99097. [Google Scholar] [CrossRef] [PubMed]
- Mennis, J.; Guo, D. Spatial data mining and geographic knowledge discovery-An introduction. Comput. Environ. Urban Syst. 2009, 33, 403–408. [Google Scholar] [CrossRef]
- Hallo, J.C.; Beeco, J.A.; Goetcheus, C.; McGee, J.; McGehee, N.G.; Norman, W.C. GPS as a Method for Assessing Spatial and Temporal Use Distributions of Nature-Based Tourists. J. Travel Res. 2012, 51, 591–606. [Google Scholar] [CrossRef]
- Roberto, R.; Lima, J.P.; Teichrieb, V. Tracking for mobile devices: A systematic mapping study. Comput. Graph. (Pergamon) 2016, 56, 20–30. [Google Scholar] [CrossRef]
- Alsaqer, M.; Hilton, B.; Horan, T.; Aboulola, O. Performance Assessment of Geo-triggering in Small Geo-fences: Accuracy, Reliability, and Battery Drain in Different Tracking Profiles and Trigger Directions. Procedia Eng. 2015, 107, 337–348. [Google Scholar] [CrossRef] [Green Version]
- Li, F.; Wang, X.; Niu, B.; Li, H.; Li, C.; Chen, L. Exploiting location-related behaviors without the GPS data on smartphones. Inf. Sci. 2020, 527, 444–459. [Google Scholar] [CrossRef]
- Cho, H.; Ippolito, D.; Yu, Y.W. Contact Tracing Mobile Apps for COVID-19: Privacy Considerations and Related Trade-Offs. 2020. Available online: http://xxx.lanl.gov/abs/2003.11511 (accessed on 24 April 2020).
- Zandbergen, P.A.; Barbeau, S.J. Positional accuracy of assisted GPS data from high-sensitivity GPS-enabled mobile phones. J. Navig. 2011, 64, 381–399. [Google Scholar] [CrossRef] [Green Version]
- Lin, K.; Kansal, A.; Lymberopoulos, D.; Zhao, F. Energy-accuracy trade-off for continuous mobile device location. In Proceedings of the MobiSys’10—Proceedings of the 8th International Conference on Mobile Systems, Applications, and Services, San Francisco, CA, USA, 15–18 June 2010; pp. 285–297. [Google Scholar] [CrossRef]
- Tawalbeh, L.A.; Basalamah, A.; Mehmood, R.; Tawalbeh, H. Greener and Smarter Phones for Future Cities: Characterizing the Impact of GPS Signal Strength on Power Consumption. IEEE Access 2016, 4, 858–868. [Google Scholar] [CrossRef]
- Jeong, S.; Kuk, S.; Kim, H. A Smartphone Magnetometer-Based Diagnostic Test for Automatic Contact Tracing in Infectious Disease Epidemics. IEEE Access 2019, 7, 20734–20747. [Google Scholar] [CrossRef] [PubMed]
- Kuk, S.; Park, Y.; Han, S.; Kim, H. Car-level co-location detection on trains for infectious disease epidemic monitoring. Electron. Lett. 2017, 53, 8–10. [Google Scholar] [CrossRef]
- Wang, Z.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process. 2004, 13, 600–612. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Wang, Z.; Bovik, A.C. Mean squared error: Love It or Leave It? IEEE Signal Process. Mag. 2009, 26, 98–117. [Google Scholar] [CrossRef]
- Kingma, D.P.; Ba, J.L. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015—Conference Track Proceedings, International Conference on Learning Representations, ICLR, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Maas, A.L.; Hannun, A.Y.; Ng, A.Y. Rectifier Nonlinearities Improve Neural Network Acoustic Models. In Proceedings of the 30th International Conference on Machine Learning, ICML 2013, Atlanta, GA, USA, 16–21 June 2013. [Google Scholar]
- Novakova, L.; Pavlis, T.L. Assessment of the precision of smart phones and tablets for measurement of planar orientations: A case study. J. Struct. Geol. 2017, 97, 93–103. [Google Scholar] [CrossRef] [Green Version]
No | Test Data 1: Samsung Galaxy Tab S5e (Threshold: 0.5) | Test Data 2: Samsung Galaxy S6 (Threshold: 0.5) | ||||
---|---|---|---|---|---|---|
SSIM | SSIM Prediction | Ground Truth | SSIM | SSIM Prediction | Ground Truth | |
0 | 0.585592 | S | S | 0.693903 | S | S |
1 | 0.748521 | S | S | 0.533133 | S | S |
2 | 0.672886 | S | S | 0.501918 | S | S |
3 | 0.659999 | S | S | 0.522440 | S | S |
4 | 0.609034 | S | D | 0.618838 | S | D |
5 | 0.715449 | S | D | 0.427649 | D | D |
6 | 0.504019 | S | D | 0.393774 | D | D |
7 | 0.468111 | D | D | 0.309711 | D | D |
8 | 0.445322 | D | D | 0.338585 | D | D |
No | Test Data 1: Samsung Galaxy Tab S5e (Threshold: 0.5) | Test Data 2: Samsung Galaxy S6 (Threshold: 0.5) | ||||
---|---|---|---|---|---|---|
SSIM | SSIM Prediction | Ground Truth | SSIM | SSIM Prediction | Ground Truth | |
0 | 0.697742 | S | S | 0.649192 | S | S |
1 | 0.812677 | S | S | 0.513390 | S | S |
2 | 0.745109 | S | S | 0.514484 | S | S |
3 | 0.697573 | S | S | 0.511380 | S | S |
4 | 0.667691 | S | D | 0.566473 | S | D |
5 | 0.789856 | S | D | 0.433923 | D | D |
6 | 0.569859 | S | D | 0.304871 | D | D |
7 | 0.471322 | D | D | 0.297473 | D | D |
8 | 0.437346 | D | D | 0.343636 | D | D |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kosasih, D.I.; Lee, B.-G.; Lim, H.; Atiquzzaman, M. An Unsupervised Learning-Based Spatial Co-Location Detection System from Low-Power Consumption Sensor. Sensors 2021, 21, 4773. https://doi.org/10.3390/s21144773
Kosasih DI, Lee B-G, Lim H, Atiquzzaman M. An Unsupervised Learning-Based Spatial Co-Location Detection System from Low-Power Consumption Sensor. Sensors. 2021; 21(14):4773. https://doi.org/10.3390/s21144773
Chicago/Turabian StyleKosasih, David Ishak, Byung-Gook Lee, Hyotaek Lim, and Mohammed Atiquzzaman. 2021. "An Unsupervised Learning-Based Spatial Co-Location Detection System from Low-Power Consumption Sensor" Sensors 21, no. 14: 4773. https://doi.org/10.3390/s21144773
APA StyleKosasih, D. I., Lee, B.-G., Lim, H., & Atiquzzaman, M. (2021). An Unsupervised Learning-Based Spatial Co-Location Detection System from Low-Power Consumption Sensor. Sensors, 21(14), 4773. https://doi.org/10.3390/s21144773