90 likes | 329 Views
Catching up. Vigenère Cypher. Keyword:CAT Plain text: PROJECT Code: P row C, column P = R R row A, column R = R O row T, column O = H J row C, column J = L E row A, column E = E C row T, column C = V T row C, column T = V. Vector space model. Vector spaces.
E N D
VigenèreCypher Keyword:CAT Plain text: PROJECT Code: P row C, column P = R R row A, column R = R O row T, column O = H J row C, column J = L E row A, column E = E C row T, column C = V T row C, column T = V
Vector spaces The Salton Vector Space model • Assign weights to terms and to documents based on the expected significance of a search term: • Term weight = wi = tfi*log(D/dfi) where • tfi =number of times term #ioccurs in a document • dfi = # documents that contain term #i • D = number of documents in the collection Source: Dr. E. Garciahttp://www.miislita.com/term-vector/term-vector-1.html#d
wi increases with tfi • Vulnerable to spamming (faking relevance by inserting extra copies of a term in a document just to raise the score) • For documents of equal length, the document with the most repetitions of the term are favored. • For documents of different lengths, the longer document will be favored as it is more likely to have more copies of the term. Source: Dr. E. Garciahttp://www.miislita.com/term-vector/term-vector-1.html#d
wi decreases as dfiincreases • log(D/dfi) -- inverse document frequency • Measure of volume of information associated with a term i within a set of D documents Source: Dr. E. Garciahttp://www.miislita.com/term-vector/term-vector-1.html#d
Example: • Collection about birds -- photos, articles, recordings of bird calls, etc. Assume • 5000 photos, 1000 articles, 550 recordings • Search on “wing” • Every photo will include wings, most likely • The recordings will probably not refer to wings (perhaps there are some recordings of wings flapping, but let’s ignore that for now) • Articles about birds are pretty likely to refer to wing.
Suppose we search only the articles and find that for a particular article, the term frequency of wing is 27 and that 700 of the articles contain the word wing. • The weight wi is 27 * log(1000/700) = 4.182 • If only 200 of the articles contained the word wing, then the weight wi would be 27 * log(1000/200) = 18.87 • The significance of the search term is greater if it is not common to most of the items in the collection.
The frequency of 27 looks impressive on first glance. However, considering the distinguishing power of that term within the context of that collection gives us a different evaluation. • Is this a good article for our purpose?