Docsity

Web Mining: Uncovering Unusual Itemsets & Extracting Relations with Dynamic Counting, Study notes of Distributed Database Management Systems

Toggle sidebar
bg1
6 Mining the Web
Outline:
1.
Dynamic itemset counting
: Searching for
interesting
sets of items in a space too large ever to consider
even each pair of items.
2.
\Books and authors"
: Sergey Brin's intriguing experiment to mine the Web for relational data.
6.1 Finding Unusual Itemsets
The problem is to nd sets of words that appear together \unusually often" on the Web, e.g., \New" and
\York" or
f
\Dutchess", \of", \York"
g
.
\Unusually often" can be dened in various ways, in order to capture the idea that the number of
Web documents containing the set of words is much greater than what one would expect if words were
sprinkled at random, eachword with its own probability of occurrence in a document.
One appropriate wayis
entropy per word in the set
.Formally, the
interest
of a set of words
S
is
log
2
prob
(
S
)
Q
winS
prob
(
w
)
j
S
j
Note that we divide by the size of
S
to avoid the \Bonferroni eect," where there are so many sets of
a given size that some, bychance alone, will appear to be correlated.
Example: If words
a
,
b
, and
c
each appear in 1% of all documents, and
S
=
f
a; b; c
g
appears in 0.1%
of documents, then the interestingness of
S
is
,
log
2
(
:
001
=
(
:
01
:
01
:
01)
=
3 = log
2
(1000)
=
3orabout
3.3.
Technical problem: interest is not monotone, or \downwards closed," the way high support is. That
is, we can have a set
S
with a high value of interest, yet some, or even all, of its immediate proper
subsets are not interesting. In contrast, if
S
has high support, then all of its subsets have support at
least as high.
Technical problem: With more than 10
8
dierentwords appearing in the Web, it is not possible even
to consider all pairs of words.
6.2 The DICE Engine
DICE (dynamic itemset counting engine) repeatedly visits the pages of the Web, in a round-robin fashion.
At all times, it is counting occurrences of certain sets of words, and of the individual words in that set. The
number of sets being counted is small enough that the counts t in main memory.
From time to time, sayevery 5000 pages, DICE reconsiders the sets that it is counting. It throws away
those sets that have the lowest interest, and replaces them with other sets.
The choice of new sets is based on the
heavy edge property
, which is an experimentally justied observation
that those words that appear in a high-interest set are more likely than others to appear in other high-interest
sets. Thus, when selecting new sets to start counting, DICE is biased in favor of words that already appear
in high-interest sets. However, it does not rely on those words exclusively, or else it could never nd high-
interests sets composed of the manywords it has never looked at. Some (but not all) of the constructions
that DICE uses to create new sets are:
1. Two random words. This is the only rule that is independent of the heavy edge assumption, and helps
new words get into the pool.
2. A word in one of the interesting sets and one random word.
21
docsity.com
pf3
pf4

Partial preview of the text

Download Web Mining: Uncovering Unusual Itemsets & Extracting Relations with Dynamic Counting and more Study notes Distributed Database Management Systems in PDF only on Docsity!

6 Mining the Web

Outline:

  1. Dynamic itemset counting : Searching for interesting sets of items in a space to o large ever to consider even each pair of items.
  2. \Books and authors" : Sergey Brin's intriguing exp eriment to mine the Web for relational data.

6.1 Finding Unusual Itemsets

The problem is to nd sets of words that app ear together \unusually often" on the Web, e.g., \New" and \York" or f\Dutchess", \of ", \York"g.

 \Unusually often" can b e de ned in various ways, in order to capture the idea that the numb er of Web do cuments containing the set of words is much greater than what one would exp ect if words were sprinkled at random, each word with its own probability of o ccurrence in a do cument.

 One appropriate way is entropy per word in the set. Formally, the interest of a set of words S is

log 2

Q pr^ ob(S^ )

w in S^ pr^ ob(w^ )

jS j

Note that we divide by the size of S to avoid the \Bonferroni e ect," where there are so many sets of a given size that some, by chance alone, will app ear to b e correlated.

 Example: If words a, b, and c each app ear in 1% of all do cuments, and S = fa; b; cg app ears in 0.1% of do cuments, then the interestingness of S is

log 2 (: 001 =(: 01  : 01  :01)

= 3 = log 2 (1000)= 3 or ab out 3.3.

 Technical problem: interest is not monotone, or \downwards closed," the way high supp ort is. That is, we can have a set S with a high value of interest, yet some, or even all, of its immediate prop er subsets are not interesting. In contrast, if S has high supp ort, then all of its subsets have supp ort at least as high.

 Technical problem: With more than 108 di erent words app earing in the Web, it is not p ossible even to consider all pairs of words.

6.2 The DICE Engine

DICE (dynamic itemset counting engine) rep eatedly visits the pages of the Web, in a round-robin fashion. At all times, it is counting o ccurrences of certain sets of words, and of the individual words in that set. The numb er of sets b eing counted is small enough that the counts t in main memory. From time to time, say every 5000 pages, DICE reconsiders the sets that it is counting. It throws away those sets that have the lowest interest, and replaces them with other sets. The choice of new sets is based on the heavy edge property, which is an exp erimentally justi ed observation that those words that app ear in a high-interest set are more likely than others to app ear in other high-interest sets. Thus, when selecting new sets to start counting, DICE is biased in favor of words that already app ear in high-interest sets. However, it do es not rely on those words exclusively, or else it could never nd high- interests sets comp osed of the many words it has never lo oked at. Some (but not all) of the constructions that DICE uses to create new sets are:

  1. Two random words. This is the only rule that is indep endent of the heavy edge assumption, and helps new words get into the p o ol.
  2. A word in one of the interesting sets and one random word.
  1. Two words from two di erent interesting pairs.
  2. The union of two interesting sets whose intersection is of size 2 or more.
  3. fa; b; cg if all of fa; bg, fa; cg, and fb; cg are found to b e interesting.

Of course, there are generally to o many options to do all of the ab ove in all p ossible ways, so a random selection among options, giving some choices to each of the rules, is used.

6.3 Bo oks and Authors

The general idea is to search the Web for facts of a given typ e, typically what might form the tuples of a relation such as B ook s(titl e; author ). The computation is suggested by Fig. 13.

Find Find

Sample

Current patterns

patterns data

data

Current data

Figure 13: Extracting relations from the Web

  1. Start with a sample of the tuples one would like to nd. In the example discussed in the Brin pap er, ve examples of b o ok titles and their authors were used.
  2. Given a set of known examples, nd where that data app ears on the Web. If a pattern is found that identi es several examples of known tuples, and is suciently sp eci c that it is unlikely to identify to o much, then accept this pattern.
  3. Given a set of accepted patterns, nd the data that app ears in these patterns, add it to the set of known data.
  4. Rep eat steps (2) and (3) several times. In the example cited, four rounds were used, leading to 15, tuples; ab out 95% were true title-author pairs.

6.4 What is a Pattern?

The notion suggested consists of ve elements:

  1. The order ; i.e., whether the title app ears prior to the author in hte text, or vice-versa. In a more general case, where tuples have more than 2 comp onents, the order would b e the p ermutation of comp onents.
  2. The URL pre x.
  3. The pre x of text, just prior to the rst of the title or author.
  4. The midd le : text app earing b etween the two data elements.
  5. The sux of text following the second of the two data elements. Both the pre x and sux were limited to 10 characters.

Example 6.1 : A p ossible pattern might consist of the following:

6.7 Building Patterns from Data Occurrences

  1. Group the data o ccurrences according to their order and middle. For example, one group in the \group-by" might corresp ond to the order \title-then-author" and the middle </I> by.
  2. For each group, nd the longest common pre x, sux, and URL pre x.
  3. If the sp eci city test for this pattern is met, then accept the pattern.
  4. If the sp eci city test is not met, then try to split the group into two by extending the length of the URL pre x by one character, and rep eat from step (2). If it is imp ossible to split the group (b ecause there is only one URL) then we fail to pro duce a pattern from the group.

Example 6.2 : Supp ose our group contains the three URL's:

www.stanford.edu/class/cs345/index.html www.stanford.edu/class/cs145/intro.html www.stanford.edu/class/cs140/readings.html

The common pre x is www.stanford.edu/class/cs. If we have to split the group, then the next character, 3 versus 1, breaks the group into two, with those data o ccurrences in the rst page (there could b e many such o ccurrences) going into one group, and those o ccurrences on the other two pages going into another. 2

6.8 Finding Occurrences Given Patterns

  1. Find all URL's that match the URL pre x in at least one pattern.
  2. For each of those pages, scan the text using a regular expression built from the pattern's pre x, middle, and sux.
  3. Extract from each match the title and author, according the order sp eci ed in the pattern.