Session16

Session16 - CSCI585 CSCI585 Nearest Neighbor Queries...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSCI585 CSCI585 Nearest Neighbor Queries Instructor: Cyrus Shahabi CSCI585 CSCI585 2 Nearest Neighbor Search Retrieve the nearest neighbor of query point Q Simple Strategy: convert the nearest neighbor search to range search. Guess a range around Q that contains at least one object say O if the current guess does not include any answers, increase range size until an object found. Compute distance d between Q and O re-execute the range query with the distance d around Q. Compute distance of Q from each retrieved object. The object at minimum distance is the nearest neighbor!!! CSCI585 CSCI585 Nave Approach A B C E F G H Query Point Q Issues: how to guess range? The retrieval may be sub-optimal if incorrect range guessed. Would be a problem in high dimensional spaces. B C E F G H A: B: C: 4 5 6 1 2 3 10 11 12 7 8 9 E F G H 6 7 2 3 1 4 5 8 9 10 11 12 CSCI585 CSCI585 4 Given a query location q , find the nearest object. Depth First and Best-First Search using R-trees Goal: avoid visiting nodes that cannot contain results q a CSCI585 CSCI585 5 Basic Pruning Metric: MINDIST Minimum distance between q and an MBR. mindist ( E 1 , q ) is a lower bound of d ( o , q ) for every object o in E 1 . If we have found a candidate NN p , we can prune every MBR whose mindist > d ( p , q ). E 1 p q mindist ( E 1 , q ) CSCI585 CSCI585 MINDIST Property MINDIST is a lower bound of any k-NN distance (s1, s2) (t1, t2) (p1, p2) (p1, p2) (p1, p2) (p1, p2) (p1, p2) 6 CSCI585 CSCI585 7 Depth-First (DF) NN Algorithm Roussoulos et al., SIGMOD, 1995 2 4 6 8 10 2 4 6 8 10 x axis y axis b c a E 3 d e f g h i j k l m query E 4 E 5 E 1 E 2 E 6 E 7 1 2 5 9 5 2 13 a b c d e E 1 E 2 E 3 E 4 E 5 Root E 1 E 2 E 3 E 4 f g h E 5 l m E 7 i j k E 6 E 6 E 7 2 10 13 Note : distances not actually stored inside nodes. Only for illustration 5 Main idea Starting from the root visit nodes according to their mindist in depth-first manner CSCI585 CSCI585 8 DF Search Visit E 1 2 4 6 8 10 2 4 6 8 10 x axis y axis b c a E 3 d e f g h i j k l m query E 4 E 5 E 1 E 2 E 6 E 7 1 2 5 9 5 2 13 a b c d e E 1 E 2 E 3 E 4 E 5 Root E 1 E 2 E 3 E 4 f g h E 5 l m E 7 i j k E 6 E 6 E 7 2 5 CSCI585 CSCI585 9 DF Search Find Candidate NN a First Candidate NN: a with distance 1 2 5 9 5 2 13 a b c d e E 1 E 2 E 3 E 4 E 5 Root E 1 E 2 E 3 E 4...
View Full Document

This document was uploaded on 05/17/2010.

Page1 / 37

Session16 - CSCI585 CSCI585 Nearest Neighbor Queries...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online