{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,12,26]],"date-time":"2025-12-26T03:48:22Z","timestamp":1766720902516,"version":"build-2065373602"},"reference-count":54,"publisher":"MDPI AG","issue":"4","license":[{"start":{"date-parts":[[2020,12,3]],"date-time":"2020-12-03T00:00:00Z","timestamp":1606953600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100001871","name":"Funda\u00e7\u00e3o para a Ci\u00eancia e a Tecnologia","doi-asserted-by":"publisher","award":["POCI-01-0145-FEDER-016883"],"award-info":[{"award-number":["POCI-01-0145-FEDER-016883"]}],"id":[{"id":"10.13039\/501100001871","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Computers"],"abstract":"<jats:p>The kNN machine learning method is widely used as a classifier in Human Activity Recognition (HAR) systems. Although the kNN algorithm works similarly both online and in offline mode, the use of all training instances is much more critical online than offline due to time and memory restrictions in the online mode. Some methods propose decreasing the high computational costs of kNN by focusing, e.g., on approximate kNN solutions such as the ones relying on Locality-Sensitive Hashing (LSH). However, embedded kNN implementations also need to address the target device\u2019s memory constraints, especially as the use of online classification needs to cope with those constraints to be practical. This paper discusses online approaches to reduce the number of training instances stored in the kNN search space. To address practical implementations of HAR systems using kNN, this paper presents simple, energy\/computationally efficient, and real-time feasible schemes to maintain at runtime a maximum number of training instances stored by kNN. The proposed schemes include policies for substituting the training instances, maintaining the search space to a maximum size. Experiments in the context of HAR datasets show the efficiency of our best schemes.<\/jats:p>","DOI":"10.3390\/computers9040096","type":"journal-article","created":{"date-parts":[[2020,12,3]],"date-time":"2020-12-03T11:15:43Z","timestamp":1606994143000},"page":"96","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":27,"title":["kNN Prototyping Schemes for Embedded Human Activity Recognition with Online Learning"],"prefix":"10.3390","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-6553-4220","authenticated-orcid":false,"given":"Paulo J. S.","family":"Ferreira","sequence":"first","affiliation":[{"name":"INESC TEC, Faculty of Engineering, University of Porto, 4200-465 Porto, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7353-1799","authenticated-orcid":false,"given":"Jo\u00e3o M. P.","family":"Cardoso","sequence":"additional","affiliation":[{"name":"INESC TEC, Faculty of Engineering, University of Porto, 4200-465 Porto, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2471-2833","authenticated-orcid":false,"given":"Jo\u00e3o","family":"Mendes-Moreira","sequence":"additional","affiliation":[{"name":"INESC TEC, Faculty of Engineering, University of Porto, 4200-465 Porto, Portugal"}]}],"member":"1968","published-online":{"date-parts":[[2020,12,3]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"1192","DOI":"10.1109\/SURV.2012.110112.00192","article-title":"A Survey on Human Activity Recognition using Wearable Sensors","volume":"15","author":"Lara","year":"2013","journal-title":"IEEE Commun. Surv. Tutorials"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"2059","DOI":"10.3390\/s150102059","article-title":"A Survey of Online Activity Recognition Using Mobile Phones","volume":"15","author":"Shoaib","year":"2015","journal-title":"Sensors"},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Shoaib, M., Bosch, S., Incel, O., Scholten, H., and Havinga, P. (2016). Complex human activity recognition using smartphone and wrist-worn motion sensors. Sensors, 16.","DOI":"10.3390\/s16040426"},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"3095","DOI":"10.1109\/ACCESS.2017.2676168","article-title":"Performance analysis of smartphone-sensor behavior for human activity recognition","volume":"5","author":"Chen","year":"2017","journal-title":"IEEE Access"},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"110","DOI":"10.1016\/j.neucom.2016.02.088","article-title":"Detecting physical activity within lifelogs towards preventing obesity and aiding ambient assisted living","volume":"230","author":"Dobbins","year":"2017","journal-title":"Neurocomputing"},{"key":"ref_6","unstructured":"Sang, V.N.T., Thang, N.D., Van Toi, V., Hoang, N.D., and Khoa, T.Q.D. (2014, January 16\u201318). Human Activity Recognition and Monitoring Using Smartphones. Proceedings of the 5th International Conference on Biomedical Engineering, Ho Chi Minh, Vietnam."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Reiss, A., and Stricker, D. (2012, January 18\u201322). Introducing a New Benchmarked Dataset for Activity Monitoring. Proceedings of the 16th IEEE International Symposium on Wearable Computers (ISWC), Newcastle, UK.","DOI":"10.1109\/ISWC.2012.13"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Banos, O., Garcia, R., Holgado-Terriza, J.A., Damas, M., Pomares, H., Rojas, I., Saez, A., and Villalonga, C. (2014). mHealthDroid: A novel framework for agile development of mobile health applications. International Workshop on Ambient Assisted Living, Springer.","DOI":"10.1007\/978-3-319-13105-4_14"},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Lara, O.D., and Labrador, M.A. (2012, January 14\u201317). A mobile platform for real-time human activity recognition. Proceedings of the 2012 IEEE Consumer Communications and Networking Conference (CCNC), Las Vegas, NV, USA.","DOI":"10.1109\/CCNC.2012.6181018"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Li, R., Cao, J., and Bourgeois, J. (2012). Energy Efficient Activity Recognition Based on Low Resolution Accelerometer in Smart Phones. Advances in Grid and Pervasive Computing, Springer.","DOI":"10.1007\/978-3-642-30767-6"},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Siirtola, P., and R\u00f6ning, J. (2013, January 16\u201319). Ready-to-use activity recognition for smartphones. Proceedings of the 2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM), Singapore.","DOI":"10.1109\/CIDM.2013.6597218"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"675","DOI":"10.1007\/s00779-012-0515-4","article-title":"Activity Logging Using Lightweight Classification Techniques in Mobile Devices","volume":"17","author":"Barbolla","year":"2013","journal-title":"Pers. Ubiquitous Comput."},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Das, B., Seelye, A.M., Thomas, B.L., Cook, D.J., Holder, L.B., and Schmitter-Edgecombe, M. (2012, January 14\u201317). Using smart phones for context-aware prompting in smart environments. Proceedings of the 2012 IEEE Consumer Communications and Networking Conference (CCNC), Las Vegas, NV, USA.","DOI":"10.1109\/CCNC.2012.6181023"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Gomes, J.B., Krishnaswamy, S., Gaber, M.M., Sousa, P.A.C., and Menasalvas, E. (2012, January 23\u201326). MARS: A Personalised Mobile Activity Recognition System. Proceedings of the 2012 IEEE 13th International Conference on Mobile Data Management, Bengaluru, India.","DOI":"10.1109\/MDM.2012.33"},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"2193","DOI":"10.1249\/MSS.0b013e31829736d6","article-title":"Activity recognition using a single accelerometer placed at the wrist or ankle","volume":"45","author":"Mannini","year":"2013","journal-title":"Med. Sci. Sports Exerc."},{"key":"ref_16","first-page":"38","article-title":"Recognizing Human Activities User-independently on Smartphones Based on Accelerometer Data","volume":"1","author":"Siirtola","year":"2012","journal-title":"Int. J. Interact. Multimed. Artif. Intell."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"9893","DOI":"10.1109\/ACCESS.2018.2890675","article-title":"InnoHAR: A Deep Neural Network for Complex Human Activity Recognition","volume":"7","author":"Xu","year":"2019","journal-title":"IEEE Access"},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"915","DOI":"10.1016\/j.asoc.2017.09.027","article-title":"Real-time human activity recognition from accelerometer data using Convolutional Neural Networks","volume":"62","author":"Ignatov","year":"2018","journal-title":"Appl. Soft Comput."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"235","DOI":"10.1016\/j.eswa.2016.04.032","article-title":"Human activity recognition with smartphone sensors using deep learning neural networks","volume":"59","author":"Ronao","year":"2016","journal-title":"Expert Syst. Appl."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"743","DOI":"10.1007\/s11036-019-01445-x","article-title":"Deep learning models for real-time human activity recognition with smartphones","volume":"25","author":"Wan","year":"2020","journal-title":"Mob. Netw. Appl."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"307","DOI":"10.1016\/j.future.2017.11.029","article-title":"A robust human activity recognition system using smartphone sensors and deep learning","volume":"81","author":"Hassan","year":"2017","journal-title":"Future Gener. Comput. Syst."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"341","DOI":"10.1016\/j.neucom.2019.08.092","article-title":"Online active learning for human activity recognition from sensory data streams","volume":"390","author":"Mohamad","year":"2020","journal-title":"Neurocomputing"},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Yin, H., Camacho, D., Novais, P., and Tall\u00f3n-Ballesteros, A. (2018). A cluster based prototype reduction for online classification. Intelligent Data Engineering and Automated Learning\u2014IDEAL 2018, Springer. Lecture Notes in Computer Science.","DOI":"10.1007\/978-3-030-03493-1"},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Bhat, G., Deb, R., Chaurasia, V.V., Shill, H., and Ogras, U.Y. (2018, January 5\u20138). Online Human Activity Recognition using Low-Power Wearable Devices. Proceedings of the 2018 IEEE\/ACM International Conference on Computer-Aided Design (ICCAD), San Diego, CA, USA.","DOI":"10.1145\/3240765.3240833"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Yin, H., Camacho, D., Tino, P., Tall\u00f3n-Ballesteros, A.J., Menezes, R., and Allmendinger, R. (2019). An Efficient Scheme for Prototyping kNN in the Context of Real-Time Human Activity Recognition. Intelligent Data Engineering and Automated Learning\u2013IDEAL 2019, Springer International Publishing.","DOI":"10.1007\/978-3-030-33607-3"},{"key":"ref_26","unstructured":"Kwapisz, J.R., Weiss, G.M., and Moore, S.A. (2010, January 4\u201330). Activity recognition using cell phone accelerometers. Proceedings of the Fourth International Workshop on Knowledge Discovery from Sensor Data, Washington, DC, USA."},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"133190","DOI":"10.1109\/ACCESS.2019.2940729","article-title":"Smartphone and Smartwatch-Based Biometrics Using Activities of Daily Living","volume":"7","author":"Weiss","year":"2019","journal-title":"IEEE Access"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Bifet, A., Pfahringer, B., Read, J., and Holmes, G. (2013, January 18\u201322). Efficient Data Stream Classification via Probabilistic Adaptive Windows. Proceedings of the 28th Annual ACM Symposium on Applied Computing, Coimbra, Portugal.","DOI":"10.1145\/2480362.2480516"},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Bifet, A., and Gavalda, R. (2007, January 26\u201328). Learning from time-changing data with adaptive windowing. Proceedings of the 2007 SIAM International Conference on Data Mining, Minneapolis, Minnesota.","DOI":"10.1137\/1.9781611972771.42"},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Indyk, P., and Motwani, R. (1998, January 23\u201326). Approximate Nearest Neighbors: Towards Removing the Curse of Dimensionality. Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, Dallas, TX, USA.","DOI":"10.1145\/276698.276876"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Datar, M., Immorlica, N., Indyk, P., and Mirrokni, V.S. (2004, January 9\u201311). Locality-sensitive hashing scheme based on p-stable distributions. Proceedings of the 20th Annual Symposium on Computational Geometry\u2014SCG\u201904, Brooklyn, NY, USA.","DOI":"10.1145\/997817.997857"},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"11820","DOI":"10.1016\/j.eswa.2011.03.070","article-title":"Prototype reduction techniques: A comparison among different approaches","volume":"38","author":"Nanni","year":"2011","journal-title":"Expert Syst. Appl."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"417","DOI":"10.1109\/TPAMI.2011.142","article-title":"Prototype Selection for Nearest Neighbor Classification: Taxonomy and Empirical Study","volume":"34","author":"Garcia","year":"2012","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"86","DOI":"10.1109\/TSMCC.2010.2103939","article-title":"A Taxonomy and Experimental Study on Prototype Generation for Nearest Neighbor Classification","volume":"42","author":"Triguero","year":"2012","journal-title":"IEEE Trans. Syst. Man Cybern. Part C Appl. Rev."},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"515","DOI":"10.1109\/TIT.1968.1054155","article-title":"The condensed nearest neighbor rule (Corresp.)","volume":"14","author":"Hart","year":"1968","journal-title":"IEEE Trans. Inf. Theory"},{"key":"ref_36","unstructured":"Kira, K., and Rendell, L.A. (1992, January 12\u201316). The Feature Selection Problem: Traditional Methods and a New Algorithm. Proceedings of the Tenth National Conference on Artificial Intelligence, San Jose, CA, USA."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"531","DOI":"10.1016\/j.patcog.2017.09.038","article-title":"Clustering-based k-nearest neighbor classification for large-scale data with neural codes representation","volume":"74","author":"Gallego","year":"2018","journal-title":"Pattern Recognit."},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Athitsos, V., Potamias, M., Papapetrou, P., and Kollios, G. (2008, January 7\u201312). Nearest Neighbor Retrieval Using Distance-Based Hashing. Proceedings of the 2008 IEEE 24th International Conference on Data Engineering, Cancun, Mexico.","DOI":"10.1109\/ICDE.2008.4497441"},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"He, J., Chang, S., Radhakrishnan, R., and Bauer, C. (2011, January 20\u201325). Compact hashing with joint optimization of search accuracy and time. Proceedings of the CVPR, Colorado Springs, CO, USA.","DOI":"10.1109\/CVPR.2011.5995518"},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"117","DOI":"10.1145\/1327452.1327494","article-title":"Near-Optimal Hashing Algorithms for Approximate Nearest Neighbor in High Dimensions","volume":"51","author":"Andoni","year":"2008","journal-title":"Commun. ACM"},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"Magalh\u00e3es, R.M.C., Cardoso, J.M.P., and Mendes-Moreira, J. (2019, January 3\u20136). Energy Efficient Smartphone-Based Users Activity Classification. Proceedings of the 19th EPIA Conference on Artificial Intelligence, Vila Real, Portugal.","DOI":"10.1007\/978-3-030-30244-3_18"},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Losing, V., Hammer, B., and Wersing, H. (2016, January 12\u201315). KNN Classifier with Self Adjusting Memory for Heterogeneous Concept Drift. Proceedings of the 2016 IEEE 16th International Conference on Data Mining (ICDM), Barcelona, Spain.","DOI":"10.1109\/ICDM.2016.0040"},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"67","DOI":"10.1016\/j.jpdc.2017.05.007","article-title":"GCHAR: An efficient Group-based Context\u2014Aware human activity recognition on smartphone","volume":"118","author":"Cao","year":"2018","journal-title":"J. Parallel Distrib. Comput."},{"key":"ref_44","doi-asserted-by":"crossref","unstructured":"Zheng, L., Wu, D., Ruan, X., Weng, S., Peng, A., Tang, B., Lu, H., Shi, H., and Zheng, H. (2017). A Novel Energy-Efficient Approach for Human Activity Recognition. Sensors, 17.","DOI":"10.3390\/s17092064"},{"key":"ref_45","doi-asserted-by":"crossref","unstructured":"Yan, Z., Subbaraju, V., Chakraborty, D., Misra, A., and Aberer, K. (2012, January 18\u201322). Energy-Efficient Continuous Activity Recognition on Mobile Phones: An Activity-Adaptive Approach. Proceedings of the 2012 16th International Symposium on Wearable Computers, Newcastle, UK.","DOI":"10.1109\/ISWC.2012.23"},{"key":"ref_46","doi-asserted-by":"crossref","first-page":"303","DOI":"10.1007\/s11036-013-0448-9","article-title":"Energy-Efficient Motion Related Activity Recognition on Mobile Devices for Pervasive Healthcare","volume":"19","author":"Liang","year":"2014","journal-title":"Mob. Netw. Appl."},{"key":"ref_47","doi-asserted-by":"crossref","unstructured":"Yang, T., Cao, L., and Zhang, C. (2010, January 21\u201324). A Novel Prototype Reduction Method for the K-Nearest Neighbor Algorithm with K \u2265 1. Proceedings of the 14th Pacific-Asia Conference on Advances in Knowledge Discovery and Data Mining\u2014Volume Part II, Hyderabad, India.","DOI":"10.1007\/978-3-642-13672-6_10"},{"key":"ref_48","doi-asserted-by":"crossref","first-page":"2227","DOI":"10.1109\/TPAMI.2014.2321376","article-title":"Scalable Nearest Neighbor Algorithms for High Dimensional Data","volume":"36","author":"Muja","year":"2014","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_49","doi-asserted-by":"crossref","first-page":"170864","DOI":"10.1109\/ACCESS.2019.2955864","article-title":"kNN-STUFF: kNN STreaming Unit for Fpgas","volume":"7","author":"Vieira","year":"2019","journal-title":"IEEE Access"},{"key":"ref_50","doi-asserted-by":"crossref","unstructured":"Ito, T., Itotani, Y., Wakabayashi, S., Nagayama, S., and Inagi, M. (2018, January 11\u201315). A Nearest Neighbor Search Engine Using Distance-Based Hashing. Proceedings of the 2018 International Conference on Field-Programmable Technology (FPT), Naha Okinawa, Japan.","DOI":"10.1109\/FPT.2018.00031"},{"key":"ref_51","first-page":"1601","article-title":"MOA: Massive Online Analysis","volume":"11","author":"Bifet","year":"2010","journal-title":"J. Mach. Learn. Res."},{"key":"ref_52","unstructured":"Baek, I.H., and Liu, X. (2017). Power and Energy Analysis on Odroid-XU+ E and Adaptive Power Model, University of California Los Angeles."},{"key":"ref_53","doi-asserted-by":"crossref","first-page":"5163","DOI":"10.3390\/s150305163","article-title":"Low Energy Physical Activity Recognition System on Smartphones","volume":"15","author":"Ortega","year":"2015","journal-title":"Sensors"},{"key":"ref_54","unstructured":"Youssef, A., Aerts, J., Vanrumste, B., and Luca, S. (2020). A Localised Learning Approach Applied to Human Activity Recognition. IEEE Intell. Syst."}],"container-title":["Computers"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2073-431X\/9\/4\/96\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T10:41:10Z","timestamp":1760179270000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2073-431X\/9\/4\/96"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,12,3]]},"references-count":54,"journal-issue":{"issue":"4","published-online":{"date-parts":[[2020,12]]}},"alternative-id":["computers9040096"],"URL":"https:\/\/doi.org\/10.3390\/computers9040096","relation":{},"ISSN":["2073-431X"],"issn-type":[{"type":"electronic","value":"2073-431X"}],"subject":[],"published":{"date-parts":[[2020,12,3]]}}}