Skip to main content

Nearest Neighbors via a Hybrid Approach in Large Datasets: A Speed up

  • Conference paper
  • First Online:
Proceedings of International Conference on Computational Intelligence and Data Engineering

Abstract

A Spatial data structure such as kd-tree is a proven data structure in searching Nearest Neighbors of a query point. However, constructing a kd-tree for determining the nearest neighbors becomes a computationally difficult task as the size of the data increases both in dimensions and the number of data points. So, we need a method that overcomes this shortcoming. This paper proposes a hybrid algorithm to speed up the process of identifying k-nearest neighbors for a given query point q. The proposed algorithm uses lightweight coreset algorithm to sample K points. These points are then used as a seed to the K-Means clustering algorithm to cluster the data points. The algorithm finally determines the nearest neighbors of a query point by searching the clusters that are closest to the query point. While analyzing the performance of the proposed algorithm, the time consumed for constructing the coreset and K-Means algorithms is not taken in to account. This is because these algorithms are used only once. The proposed method is compared with two existing algorithms in the literature. We called these two methods as “general or normal method” and “without using coresets”. The comparative results prove that the proposed algorithm reduces the time consumed to generate kd-tree and also K-Means clustering.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 219.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 279.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 279.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Samet H (1989) The design and analysis of spatial data structures. Addison-Wesley, Reading, MA

    Google Scholar 

  2. Knuth DE (1973) The art of computer programming. Sorting and Searching, vol 3. Addison-Wesley, Reading, MA

    Google Scholar 

  3. Bentley JL, Friedman JH (1979) Data structures for range searching. ACM Comput Surv 11(4):397–409

    Article  Google Scholar 

  4. Finkel RA, Bentley JL (1974) Quadtrees: a data structure for retrieval on composite keys. Acta Informatica 4(1):1–9

    Article  Google Scholar 

  5. Orenstein JA (1982) Multidimensional tries used for associative searching. Inform Process Lett 14(4):150–157

    Article  Google Scholar 

  6. Tamminen M (1981) The EXCELL method for efficient geometric access to data. Series Acta Polytech Scand, Math Comput Sci 34

    Google Scholar 

  7. Nievergelt J, Hinterberger H, Sevcik KC (1984) The grid file: an adaptable, symmetric multikey file structure. ACM Trans Database Syst 9(1):38–71

    Article  Google Scholar 

  8. Bachem O, Lucic M, Krause A (2018) Scalable k-means clustering via lightweight coresets. In: Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery and data mining (KDD ’18), pp 1119–1127. ACM, New York, NY, USA. https://doi.org/10.1145/3219819.3219973

  9. Maneewongvatana S, David M (1999) Mount: its okay to be skinny, if your friends are fat. In: 4th annual CGC workshop on comptutational geometry

    Google Scholar 

  10. Ashok, Kumari OG, Pasunuri R, Vadlamudi CV, Subba Rao YV, Rukma Rekha N (2019) CKD tree: an improved KD-tree construction algorithm using coresets for k-NN based classification. Communicated

    Google Scholar 

  11. Spatial KD-tree. https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.spatial.KDTree.html

  12. Bentley JL (1979) Decomposable searching problems. Inform Process Lett 8:244–251

    Article  MathSciNet  Google Scholar 

  13. Datasets. https://archive.ics.uci.edu/ml/datasets.php, https://archive.ics.uci.edu/ml/datasets.php

  14. Ram P, Sinha K (2019) Revisiting kd-tree for nearest neighbor search, KDD ’19, Anchorage. AK, USA

    Google Scholar 

  15. Mahajana Meena, Nimbhorkara Prajakta, Varadarajanb Kasturi (2012) The planar k-means problem is NP-hard. Theor Comput Sci 442(13):13–21

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Y. Narasimhulu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Narasimhulu, Y., Pasunuri, R., Venkaiah, V.C. (2021). Nearest Neighbors via a Hybrid Approach in Large Datasets: A Speed up. In: Chaki, N., Pejas, J., Devarakonda, N., Rao Kovvur, R.M. (eds) Proceedings of International Conference on Computational Intelligence and Data Engineering. Lecture Notes on Data Engineering and Communications Technologies, vol 56. Springer, Singapore. https://doi.org/10.1007/978-981-15-8767-2_4

Download citation

Publish with us

Policies and ethics