{"title":"k++ kNN:精确搜索k个最近邻的快速算法","authors":"Raphael Lopes de Souza, Osvaldo Luiz De Oliveira","doi":"10.23919/CISTI58278.2023.10211848","DOIUrl":null,"url":null,"abstract":"The k-NN algorithm - k-nearest neighbor - is widely used in Machine Learning and Statistics for tasks involving classification and regression. Having as inputs an instance x, a set of instances T and an integer $k \\geqslant 1$, the k-NN performs an exhaustive search in T of the k instances most similar to instance x (k-nearest neighbors). In applications involving many instances and/or instances with high dimensionality, the search process is time-consuming due to the need to perform many calculations of similarity functions between instances. Several proposals to reduce the k-NN search time have been made, some of them aiming at the exact search of the k most similar instances to x in T and, others, reducing the search time via approximate methods to calculate the most similar instances to x. This work proposes an algorithm called $\\mathrm{kM}++\\mathrm{kNN}$ for the exact search of the k most similar instances to x in T, which uses the triangular inequality concept to reduce the ${\\mathrm {k-N N}}$ search time. The ${\\mathrm {k M++k N N}}$ algorithm is compared, in experiments to measure the economy of the number of calculations of similarity functions between instances and search time, with an algorithm currently considered fast, the kMkNN.","PeriodicalId":121747,"journal":{"name":"2023 18th Iberian Conference on Information Systems and Technologies (CISTI)","volume":"4 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-06-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"kM++kNN : A fast algorithm for the exact search of k-nearest neighbors\",\"authors\":\"Raphael Lopes de Souza, Osvaldo Luiz De Oliveira\",\"doi\":\"10.23919/CISTI58278.2023.10211848\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The k-NN algorithm - k-nearest neighbor - is widely used in Machine Learning and Statistics for tasks involving classification and regression. Having as inputs an instance x, a set of instances T and an integer $k \\\\geqslant 1$, the k-NN performs an exhaustive search in T of the k instances most similar to instance x (k-nearest neighbors). In applications involving many instances and/or instances with high dimensionality, the search process is time-consuming due to the need to perform many calculations of similarity functions between instances. Several proposals to reduce the k-NN search time have been made, some of them aiming at the exact search of the k most similar instances to x in T and, others, reducing the search time via approximate methods to calculate the most similar instances to x. This work proposes an algorithm called $\\\\mathrm{kM}++\\\\mathrm{kNN}$ for the exact search of the k most similar instances to x in T, which uses the triangular inequality concept to reduce the ${\\\\mathrm {k-N N}}$ search time. The ${\\\\mathrm {k M++k N N}}$ algorithm is compared, in experiments to measure the economy of the number of calculations of similarity functions between instances and search time, with an algorithm currently considered fast, the kMkNN.\",\"PeriodicalId\":121747,\"journal\":{\"name\":\"2023 18th Iberian Conference on Information Systems and Technologies (CISTI)\",\"volume\":\"4 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-06-20\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2023 18th Iberian Conference on Information Systems and Technologies (CISTI)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.23919/CISTI58278.2023.10211848\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 18th Iberian Conference on Information Systems and Technologies (CISTI)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.23919/CISTI58278.2023.10211848","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
kM++kNN : A fast algorithm for the exact search of k-nearest neighbors
The k-NN algorithm - k-nearest neighbor - is widely used in Machine Learning and Statistics for tasks involving classification and regression. Having as inputs an instance x, a set of instances T and an integer $k \geqslant 1$, the k-NN performs an exhaustive search in T of the k instances most similar to instance x (k-nearest neighbors). In applications involving many instances and/or instances with high dimensionality, the search process is time-consuming due to the need to perform many calculations of similarity functions between instances. Several proposals to reduce the k-NN search time have been made, some of them aiming at the exact search of the k most similar instances to x in T and, others, reducing the search time via approximate methods to calculate the most similar instances to x. This work proposes an algorithm called $\mathrm{kM}++\mathrm{kNN}$ for the exact search of the k most similar instances to x in T, which uses the triangular inequality concept to reduce the ${\mathrm {k-N N}}$ search time. The ${\mathrm {k M++k N N}}$ algorithm is compared, in experiments to measure the economy of the number of calculations of similarity functions between instances and search time, with an algorithm currently considered fast, the kMkNN.