Presentation is loading. Please wait.

Presentation is loading. Please wait.

Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1:

Similar presentations


Presentation on theme: "Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1:"— Presentation transcript:

1 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 1 Part I: Web Structure Mining Chapter 1: Information Retrieval and Web Search The Web Challenges Crawling the Web Indexing and Keyword Search Evaluating Search Quality Similarity Search

2 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 2 The Web Challenges Tim Berners-Lee, Information Management: A Proposal, CERN, March 1989.

3 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 3 The Web Challenges 18 years later … The recent Web is huge and grows incredibly fast. About ten years after the Tim Berners-Lee proposal the Web was estimated to 150 million nodes (pages) and 1.7 billion edges (links). Now it includes more than 4 billion pages, with about a million added every day. Restricted formal semantics - nodes are just web pages and links are of a single type (e.g. “refer to”). The meaning of the nodes and links is not a part of the web system, rather it is left to the web page developers to describe in the page content what their web documents mean and what kind of relations they have with the documented they link to. As there is no central authority or editors relevance, popularity or authority of web pages are hard to evaluate. Links are also very diverse and many have nothing to do with content or authority (e.g. navigation links).

4 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 4 The Web Challenges How to turn the web data into web knowledge Use the existing Web –Web Search Engines –Topic Directories Change the Web –Semantic Web

5 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 5 Crawling The Web To make Web search efficient search engines collect web documents and index them by the words (terms) they contain. For the purposes of indexing web pages are first collected and stored in a local repository Web crawlers (also called spiders or robots) are programs that systematically and exhaustively browse the Web and store all visited pages Crawlers follow the hyperlinks in the Web documents implementing graph search algorithms like depth-first and breadth-first

6 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 6 Crawling The Web Depth-first Web crawling limited to depth 3

7 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 7 Crawling The Web Breadth-first Web crawling limited to depth 3

8 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 8 Crawling The Web Issues in Web Crawling: Network latency (multithreading) Address resolution (DNS caching) Extracting URLs (use canonical form) Managing a huge web page repository Updating indices Responding to constantly changing Web Interaction of Web page developers Advanced crawling by guided (informed) search (using web page ranks)

9 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 9 Indexing and Keyword Search We need efficient content-based access to Web documents Document representation: –Term-document matrix (inverted index) Relevance ranking: –Vector space model

10 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 10 Indexing and Keyword Search Creating term-document matrix (inverted index) Documents are tokenized ( punctuation marks are removed and the character strings without spaces are considered as tokens) All characters are converted to upper or to lower case. Words are reduced to their canonical form (stemming) Stopwords (a, an, the, on, in, at, etc.) are removed. The remaining words, now called terms are used as features (attributes) in the term-document matrix

11 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 11 CCSU Departments example Document statistics Document IDDocument namewordsterms d1d1 Anthropology11486 d2d2 Art153105 d3d3 Biology12391 d4d4 Chemistry8758 d5d5 Communication12488 d6d6 Computer Science10177 d7d7 Criminal Justice8560 d8d8 Economics10776 d9d9 English11680 d 10 Geography9568 d 11 History10878 d 12 Mathematics8966 d 13 Modern Languages11075 d 14 Music13791 d 15 Philosophy8554 d 16 Physics130100 d 17 Political Science12086 d 18 Psychology9660 d 19 Sociology9966 d 20 Theatre11680 Total number of words/terms21951545 Number of different words/terms744671

12 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 12 CCSU Departments example Boolean (Binary) Term Document Matrix DIDlablaboratoryprogrammingcomputerprogram d1d1 00001 d2d2 00001 d3d3 01010 d4d4 00011 d5d5 00000 d6d6 00111 d7d7 00001 d8d8 00001 d9d9 00000 d 10 00000 d 11 00000 d 12 00010 d 13 00000 d 14 10011 d 15 00001 d 16 00001 d 17 00001 d 18 00000 d 19 00001 d 20 00000

13 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 13 CCSU Departments example Term document matrix with positions DIDlablaboratoryprogrammingcomputerprogram d1d1 0000[71] d2d2 0000[7] d3d3 0[65,69]0[68]0 d4d4 000[26][30,43] d5d5 00000 d6d6 00[40,42][1,3,7,13,26,34][11,18,61] d7d7 0000[9,42] d8d8 0000[57] d9d9 00000 d 10 00000 d 11 00000 d 12 000[17]0 d 13 00000 d 14 [42]00[41][71] d 15 0000[37,38] d 16 0000[81] d 17 0000[68] d 18 00000 d 19 0000[51] d 20 00000

14 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 14 Vector Space Model Boolean representation documents d 1, d 2, …, d n terms t 1, t 2, …, t m term t i occurs n ij times in document d j. Boolean representation: For example, if the terms are: lab, laboratory, programming, computer and program. Then the Computer Science document is represented by the Boolean vector

15 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 15 Term Frequency (TF) representation Document vector with components Using the sum of term counts: Using the maximum of term counts: Cornell SMART system:

16 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 16 Inverted Document Frequency (IDF) D ocument collection:, documen ts that contain term : Simple fraction: or Using a log function:

17 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 17 TFIDF representation For example, the computer science TF vector scaled with the IDF of the terms results in lablaboratoryProgrammingcomputerprogram 3.04452 1.435080.559616

18 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 18 Relevance Ranking Represent the query as a vector q = {computer, program} Apply IDF to its components Use Euclidean norm of the vector difference or Cosine similarity (equivalent to dot product for normalized vectors) lablaboratoryProgrammingcomputerprogram 3.04452 1.435080.559616

19 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 19 Relevance Ranking DocTFIDF Coordinates (normalized) (rank) d1d1 000010.3631.129 d2d2 000010.3631.129 d3d3 00.97200.23400.2181.250 d4d4 0000.7830.6220.956 (1)0.298 (1) d5d5 000010.3631.129 d6d6 000.5590.8110.1720.819 (2)0.603 (2) d7d7 000010.3631.129 d8d8 000010.3631.129 d9d9 0000001 d 10 0000001 d 11 0000001 d 12 000100.9320.369 d 13 0000001 d 14 0.890000.4240.1670.456 (3)1.043 (3) d 15 000010.3631.129 d 16 000010.3631.129 d 17 000010.3631.129 d 18 0000001 d 19 000010.3631.129 d 20 0000001 Cosine similarities and distances to (normalized)

20 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 20 Relevance Feedback The user provides feed back: Relevant documents Irrelevant documents The original query vector is updated (Rocchio’s method) Pseudo-relevance feedback Top 10 documents returned by the original query belong to D + The rest of documents belong to D -

21 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 21 Advanced text search Using ”OR” or “NOT” boolean operators Phrase Search –Statistical methods to extract phrases from text –Indexing phrases Part-of-speech tagging Approximate string matching (using n-grams) –Example: match “program” and “prorgam” {pr, ro, og, gr, ra, am} ∩ {pr, ro, or, rg, ga, am} = {pr, ro, am}

22 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 22 Using the HTML structure in keyword search Titles and metatags –Use them as tags in indexing –Modify ranking depending on the context where the term occurs Headings and font modifiers (prone to spam) Anchor text –Plays an important role in web page indexing and search –Allows to increase search indices with pages that have never been crawled –Allows to index non-textual content (such as images and programs

23 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 23 Evaluating search quality Assume that there is a set of queries Q and a set of documents D, and for each query submitted to the system we have: –The response set of documents (retrieved documents) –The set of relevant documents selected manually from the whole collection of documents, i.e.

24 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 24 Precision-recall framework (set-valued) Determine the relationship between the set of relevant documents ( ) and the set of retrieved documents ( ) Ideally Generally A very general query leads to recall = 1, but low precision A very restrictive query leads to precision =1, but low recall A good balance is needed to maximize both precision and recall

25 Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1: Information Retrieval an Web Search 25 Precision-recall framework (using ranks) With thousands of documents finding is practically impossible. So, let’s consider a list of ranked documents (highest rank first) For each compute its relevance as Define precision at rank k as Define recall at rank k as


Download ppt "Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, 2007. Slides for Chapter 1:"

Similar presentations


Ads by Google