K-D - Nearest neighbor search I Nearest neighbor search...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Nearest neighbor search 1 / 8 Nearest neighbor search Na¨ ıve implementation of NN classifiers based on n labeled examples requires n distance computations to compute the prediction on any test point x ∈ X . If using Euclidean distance in R d , then each distance computation is O ( d ) operations. = O ( dn ) operations per test point. Solution : store the labeled examples in a special data structure that permits fast NN queries. 2 / 8 Tree structures for one-dimensional data A data structure for fast NN search in R 1 Sort training data so that x 1 x 2 ≤ · · · ≤ x n , then construct binary tree: 1 2 4 5 6 3 7 8 x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 With each tree node, remember midpoint between rightmost point in left child, and leftmost point in right child. This permits very efficient NN search. If tree is (approximately) balanced, then O (log( n )) time to find NN! 3 / 8 Tree structures for multi-dimensional data A data structure for fast NN search in R d , d > 1 Many options, but a popular one is the K-D tree .
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern