Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ranking Instructor: Gautam Das Class notes Prepared by Sushanth Sivaram Vallath.

Similar presentations


Presentation on theme: "Ranking Instructor: Gautam Das Class notes Prepared by Sushanth Sivaram Vallath."— Presentation transcript:

1 Ranking Instructor: Gautam Das Class notes Prepared by Sushanth Sivaram Vallath

2 Rate Restaurants Select top 10 from restaurants where location=‘Arlington’ order by 3.5 * price + 1.2 * ambience Selection Condition Ranking function

3 Ranking possibilities 1.Do selection first then ranking –TA cannot be applied. There is no sorted access in price and ambience 2.First rank, then select –May not work because top 10 may not have Arlington at all 3.Rank and selection together –Run scan, but ignore tuples not = Arlington

4 Pretend 3 cols location, price, ambience –1 if Arlington –0 otherwise Select top 10 from restaurants order by location * (3.5price + 1.2ambience) Q: 0 0 1 1 0 Find the similarity with the query, (count the number of bits that match) Hamming Distance (t1, t2) = # of mismatched bits A1A2A3A4 1011 0100

5 How to do it using Threshold Algorithm Add a column tid. Order according to the value A query where only 2 conditions apply. Other fields doesn’t matter (Note: IR people used to do similar functions to rank documents)

6 Document Ranking:IR

7 Definitions Database = collection of documents = {d1, d2, …, dn} Documents = bag of words di = {w1, w2, …, w n } Vocabulary = set of all possible words

8 Represented as rows and columns Maintain a list for a word W where all the documents which contain W While searching for “Information Retrieval” whether to return the documents which contain both the words.

9 Intersection of the documents which contain both words is to be retrieved A1A2 D110 D201 D311 D410 D511 D601 A1A2 D1D2 D3 D4D5 D6 Do merge-sort to find intersection Inverted list is used to store the dictionary

10 Geographic Information systems : R-tree is used. K-nearest Neighbor problem: r-tree is used.


Download ppt "Ranking Instructor: Gautam Das Class notes Prepared by Sushanth Sivaram Vallath."

Similar presentations


Ads by Google