DOC PREVIEW
USC CSCI 599 - Nearest Neighbor Queries Slides

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

9/3/20091Nearest Neighbor QueriesLing [email protected] Roussopoulos, Stephen Kelly and Frédéric VincentOutline• Spatial Index –R‐Tree• NN query –Naïve solution• A better solution –Branch‐and‐bound• Can we do better?• Experiment Results223145RR--TreeTree6789101112323145RR--TreeTreeEF231456789101112GH4678910111223145EFRR--TreeTreeB231456789101112CGH56789101112623145ABEFRR--TreeTreeBCEFGHA:B:C:Pointer MBROne entry:6231456789101112CGHB:456123 101112789EFGH667891011129/3/20092Outline• Spatial Index –R‐Tree• NN query –Naïve solution• A better solution –Branch‐and‐bound• Can we do better?• Experiment Results7Nearest 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 til bj t fd8until 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 fr om each retrieved object. The object at minimum distance is the nearest neighbor!!!Naïve ApproachABEFBCEFGHA:B:C:456 1 2310 11 12EFG23145CGHQuery Point QIssues: how to guess range? The retrieval may be sub‐optimal if incorrect range guessed. Would be a problem in high dimensional spaces.789H67589101112Outline• Spatial Index –R‐Tree• NN query –Naïve solution• A better solution –Branch‐and‐bound• Can we do better?• Experiment Results10MINDIST 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)11A Better Strategy for KNN search• A sorted priority queue based on MINDIST;• Nodes traversed in order;• Stops when there is an object at the top of the queue; (1‐NN found)12• k‐NN can be computed incrementally;I/O optimal9/3/20093Priority QueueBCEFGHA:B:C:456123 101112789EFGH23145ABEFAB CE FC6758911CGHQuery Point QC5 6 4 FH 5 G 6 4 F7 5 8 9G 6 4 F1NN131012Outline• Spatial Index –R‐Tree• NN query –Naïve solution• A better solution –Branch‐and‐bound• Can we do better?• Experiment Results14MBR Face Property• MBR is an n‐dimensional Minimal BoundingRectangle used in R trees, which is the minimalbounding n‐dimensional rectangle bounds itscorrespondingobjectscorrespondingobjects.• MBR face property: Every face of any MBR contains at least one point of some object in the database. 15MBR Face Property –2D16MBR Face Property –3DRectangle R17Improving the KNN Algorithm• While the MinDist based algorithm is I/O optimal, its performance may be further improved by pruning nodes from the priority queue18queue.9/3/20094Properties of MINMAXDIST• MINMAXDIST(P,R) is the minimum over all dimensionsdistances from P to the furthest point of the closest face ofR.• MINMAXDIST is the smallest possible upper bound ofdistances from the point P to the rectangle R.• MINMAXDIST guarantees there is an object within the Rat a distance to P less than or equal to it.• MINMAXDIST is an upper bound of the 1-NNdistance19MINDIST & MINMAXDISTMINDIST(P,R) <= NN(P) <= MINMAXDIST(P,R)20MinDist & MinMaxDist –3DQuery Point QRectangle RMinDist(Q,R)MinMaxDist(Q,R)21Pruning 1• Downward pruning:AnMBRRisdiscardedRR’If there exists another R’ such that MINDIST(P,R)> MINMAXDIST(P,R’)RMINDISTPMINMAXDIST22Pruning 2• Downward pruning: An object O is discardedOR’If there exists an R such that Actual_dist(P,O) > MINIMAXDIST(P,R)ORActual‐distPMINMAXDIST23Pruning 3• Upward pruning:AnMBRRisdiscardedRIf an object O is found such that MINDIST(P,R) > Actual_dist(P,O)ROMINDISTPActual_dist249/3/20095MINDIST vs MINMAXDIST Ordering• MINDIST: optimistic• MINMAXDIST: pessimistic25• Example: MINDIST ordering finds the 1‐NN firstMINDIST vs MINMAXDIST Ordering26• Example: MINMAXDIST ordering finds the 1‐NN firstGeneralize to k‐NN • Keep a sorted buffer of at most k current nearest neighbors• Pruning is done according to the distance of the furthest nearest neighbor in this buffer27• Example:RThe k‐th object in the bufferMINDISTPActual_distOutline• Spatial Index –R‐Tree• NN Query –Intuitive Solutions• Optimized NN Query –branch‐and‐bound• Experiment Results9/3/20096Key Insights• # of pages accessed grows when k grews;• The denser the dataset, the more page access;• MinDist v.s. MinMaxDist: same in shape, but iih /OMinMaxDisthas more I/O cost;• In Dense area, MinMaxDist is bad;Thanks & Questions


View Full Document

USC CSCI 599 - Nearest Neighbor Queries Slides

Documents in this Course
Week8_1

Week8_1

22 pages

Week2_b

Week2_b

10 pages

LECT6BW

LECT6BW

20 pages

LECT6BW

LECT6BW

20 pages

5

5

44 pages

12

12

15 pages

16

16

20 pages

Nima

Nima

8 pages

Week1

Week1

38 pages

Week11_c

Week11_c

30 pages

afsin

afsin

5 pages

October5b

October5b

43 pages

Week11_2

Week11_2

20 pages

final

final

2 pages

c-4

c-4

12 pages

0420

0420

3 pages

Week9_b

Week9_b

20 pages

S7Kriegel

S7Kriegel

21 pages

Week4_2

Week4_2

16 pages

sandpres

sandpres

21 pages

Week6_1

Week6_1

20 pages

4

4

33 pages

Week10_c

Week10_c

13 pages

fft

fft

18 pages

LECT7BW

LECT7BW

19 pages

24

24

15 pages

14

14

35 pages

Week9_c

Week9_c

24 pages

Week11_67

Week11_67

22 pages

Week1

Week1

37 pages

LECT3BW

LECT3BW

28 pages

Week8_c2

Week8_c2

19 pages

Week5_1

Week5_1

19 pages

LECT5BW

LECT5BW

24 pages

Week10_b

Week10_b

16 pages

Week11_1

Week11_1

43 pages

Week7_2

Week7_2

15 pages

Week5_b

Week5_b

19 pages

Week11_a

Week11_a

29 pages

LECT14BW

LECT14BW

24 pages

T7kriegel

T7kriegel

21 pages

0413

0413

2 pages

3

3

23 pages

C2-TSE

C2-TSE

16 pages

10_19_99

10_19_99

12 pages

s1and2-v2

s1and2-v2

37 pages

Week10_3

Week10_3

23 pages

jalal

jalal

6 pages

1

1

25 pages

T3Querys

T3Querys

47 pages

CS17

CS17

15 pages

porkaew

porkaew

20 pages

LECT4BW

LECT4BW

21 pages

Week10_1

Week10_1

25 pages

wavelet

wavelet

17 pages

October5a

October5a

22 pages

p289-korn

p289-korn

12 pages

2

2

33 pages

rose

rose

36 pages

9_7_99

9_7_99

18 pages

Week10_2

Week10_2

28 pages

Week7_3

Week7_3

37 pages

Load more
Download Nearest Neighbor Queries Slides
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Nearest Neighbor Queries Slides and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Nearest Neighbor Queries Slides 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?