Presentation is loading. Please wait.

Presentation is loading. Please wait.

IDistance -- Indexing the Distance iDistance -- Indexing the Distance An Efficient Approach to KNN Indexing C. Yu, B. C. Ooi, K.-L. Tan, H.V. Jagadish.

Similar presentations


Presentation on theme: "IDistance -- Indexing the Distance iDistance -- Indexing the Distance An Efficient Approach to KNN Indexing C. Yu, B. C. Ooi, K.-L. Tan, H.V. Jagadish."— Presentation transcript:

1 iDistance -- Indexing the Distance iDistance -- Indexing the Distance An Efficient Approach to KNN Indexing C. Yu, B. C. Ooi, K.-L. Tan, H.V. Jagadish. Indexing the distance: an efficient method to KNN processing, VLDB 2001.

2 Similarity queries: Similarity range and KNN queries Similarity range query: Given a query point, find all data points within a given distance r to the query point. KNN query: Given a query point, find the K nearest neighbours, in distance to the point. r Kth NN Query Requirement

3 SS-tree : R-tree based index structure; use bounding spheres in internal nodes Metric-tree : R-tree based, but use metric distance and bounding spheres VA-file : use compression via bit strings for sequential filtering of unwanted data points Psphere-tree : Two level index structure; use clusters and duplicates data based on sample queries; It is for approximate KNN A-tree: R-tree based, but use relative bounding boxes Problems: hard to integrate into existing DBMSs Other Methods

4 Basic Definition Euclidean distance: Relationship between data points: Theorem 1: Let q be the query object, and Oi be the reference point for partition i, and p an arbitrary point in partition i. If dist(p, q) <= querydist(q) holds, then it follows that dist(Oi, q) – querydist(q) <= dist(Oi, p) <=dist(Oi,q) + querydist(q).

5 Basic Concept of iDistance Indexing points based on similarity y = i * c + dist (Si, p) S1S1 S2S2 S3S3 SkSk S k+1 Reference/anchor points S1S1 S2S2 S3S3... d S1+dS1+d c

6 Data points are partitioned into clusters/ partitions. For each partition, there is a Reference Point that every data point in the partition makes reference to. Data points are indexed based on similarity (metric distance) to such a point using a CLASSICAL B+-tree Iterative range queries are used in KNN searching. iDistance

7 Searching region is enlarged till getting K NN. A range in B+-tree KNN Searching... S1S1 S2S2

8 dist (S 1, q) S2S2 S1S1 Increasing search radius : r Dis_min(S 1 ) Dis_max(S 1 ) q S1S1 S2S2 0 dist (S 2, q) Dis_max(S 2 ) Dis_min(S 2 ) Dis_min(S 1 ) Dis_max(S 1 ) Dis_max(S 2 ) r dist (S 1, q) dist (S 2, q) KNN Searching

9 Q2

10 dist (S, q) Inefficient situation: When K= 3, query sphere with radius r will retrieve the 3 NNs. Among them only the o 1 NN can be guaranteed. Hence the search continues with enlarged r till r > dist(q, o 3) S q r o2o2 o1o1 o3o3 Over Search?

11 Stopping Criterion Theorem 2: The KNN search algorithm terminates when K NNs are found and the answers are correct. Case 1: dist(furthest(KNN’), q) < r Case 2: dist(furthest(KNN’), q) > r r Kth ? In case 2

12 (centroid of hyperplane, closest distance) (external point, closest distance) Space-based Partitioning: Equal-partitioning

13 (centroid of hyper-plane, furthest distance) Space-based Partitioning: Equal-partitioning from furthest points (external point, furthest distance)

14 Using external point to reduce searching area Effect of Reference Points on Query Space

15 Using (centroid, furthest distance) can greatly reduce search area The area bounded by these arches is the affected searching area. Effect on Query Space

16 Using cluster centroids as reference points Data-based Partitioning I

17 Using edge points as reference points Data-based Partitioning II

18 100K uniform data set Using (external point, furthest distance) Effect of search radius on query accuracy Dimension = 8Dimension = 16 Dimension = 30 Performance Study: Effect of Search Radius

19 10-NN queries on 100K uniform data sets Using (external point, furthest distance) Effect of search radius on query cost I/O Cost vs Search Radius

20 10-NN queries on 100K 30-d uniform data set Different Reference Points Effect of Reference Points

21 KNN queries on 100K 30-d clustered data set Effect of query radius on query accuracy for different partition number Effect of Clustered # of Partitions on Accuracy

22 10-NN queries on 100K 30-d clustered data set Effect of # of partitions on I/O and CPU Costs Effect of # of Partitions on I/O and CPU Cost

23 KNN queries on 100K, 500K 30-d clustered data sets Effect of query radius on query accuracy for different size of data sets Effect of Data Sizes

24 10-KNN query on 100K,500K 30-d clustered data sets Effect of query radius on query cost for different size of data set Effect of Clustered Data Sets

25 10-KNN query on 100K 30-d clustered data set Effect of Reference Points: Cluster Edge vs Cluster Centroid Effect of Reference Points on Clustered Data Sets

26 10-KNN query on 100K,500K 30-d clustered data sets Query cost for variant query accuracy on different size of data set iDistance ideal for Approximate KNN?

27 10-KNN query on 100K 30-d clustered data sets C. Yu, B. C. Ooi, K. L. Tan. Progressive KNN search Using B+- trees. Performance Study -- Performance Study -- Compare iMinMax and iDistance

28 iDistance vs A-tree

29

30 Summary of iDistance iDistance is simple, but efficient It is a Metric based Index The index can be integrated to existing systems easily.


Download ppt "IDistance -- Indexing the Distance iDistance -- Indexing the Distance An Efficient Approach to KNN Indexing C. Yu, B. C. Ooi, K.-L. Tan, H.V. Jagadish."

Similar presentations


Ads by Google