Upcoming SlideShare
×

# Chapter9

206 views
152 views

Published on

Published in: Engineering, Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total views
206
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
1
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Chapter9

1. 1. 1 January 17, 2001 Data Mining: Concepts and Techniques 1 Data Mining: Concepts and Techniques — Slides for Textbook — — Chapter 9 — ©Jiawei Han and Micheline Kamber Intelligent Database Systems Research Lab School of Computing Science Simon Fraser University, Canada http://www.cs.sfu.ca January 17, 2001 Data Mining: Concepts and Techniques 2 Chapter 9. Mining Complex Types of Data n Multidimensional analysis and descriptive mining of complex data objects n Mining spatial databases n Mining multimedia databases n Mining time-series and sequence data n Mining text databases n Mining the World-Wide Web n Summary January 17, 2001 Data Mining: Concepts and Techniques 3 Mining Complex Data Objects: Generalization of Structured Data n Set-valued attribute n Generalization of each value in the set into its corresponding higher-level concepts n Derivation of the general behavior of the set, such as the number of elements in the set, the types or value ranges in the set, or the weighted average for numerical data n E.g., hobby = {tennis, hockey, chess, violin, nintendo_games} generalizes to {sports, music, video_games} n List-valued or a sequence-valued attribute n Same as set-valued attributes except that the order of the elements in the sequence should be observed in the generalization January 17, 2001 Data Mining: Concepts and Techniques 4 Generalizing Spatial and Multimedia Data n Spatial data: n Generalize detailed geographic points into clustered regions, such as business, residential, industrial, or agricultural areas, according to land usage n Require the merge of a set of geographic areas by spatial operations n Image data: n Extracted by aggregation and/or approximation n Size, color, shape, texture, orientation, and relative positions and structures of the contained objects or regions in the image n Music data: n Summarize its melody: based on the approximate patterns that repeatedly occur in the segment n Summarized its style: based on its tone, tempo, or the major musical instruments played January 17, 2001 Data Mining: Concepts and Techniques 5 Generalizing Object Data n Object identifier: generalize to the lowest level of class in the class/subclass hierarchies n Class composition hierarchies n generalize nested structured data n generalize only objects closely related in semantics to the current one n Construction and mining of object cubes n Extend the attribute-oriented induction method n Apply a sequence of class-based generalization operators on different attributes n Continue until getting a small number of generalized objects that can be summarized as a concise in high-level terms n For efficient implementation n Examine each attribute, generalize it to simple-valued data n Construct a multidimensional data cube (object cube) n Problem: it is not always desirable to generalize a set of values to single-valued data January 17, 2001 Data Mining: Concepts and Techniques 6 An Example: Plan Mining by Divide and Conquer n Plan: a variable sequence of actions n E.g., Travel (flight): <traveler, departure, arrival, d-time, a-time, airline, price, seat> n Plan mining: extraction of important or significant generalized (sequential) patterns from a planbase (a large collection of plans) n E.g., Discover travel patterns in an air flight database, or n find significant patterns from the sequences of actions in the repair of automobiles n Method n Attribute-oriented induction on sequence data n A generalized travel plan: <small-big*-small> n Divide & conquer:Mine characteristics for each subsequence n E.g., big*: same airline, small-big: nearby region www.jntuworld.com www.jntuworld.com www.jwjobs.net
2. 2. 2 January 17, 2001 Data Mining: Concepts and Techniques 7 A Travel Database for Plan Mining n Example: Mining a travel planbase plan# action# departure depart_time arrival arrival_time airline … 1 1 ALB 800 JFK 900 TWA … 1 2 JFK 1000 ORD 1230 UA … 1 3 ORD 1300 LAX 1600 UA … 1 4 LAX 1710 SAN 1800 DAL … 2 1 SPI 900 ORD 950 AA … . . . . . . . . . . . . . . . . . . . . . . . . airport_code city state region airport_size … 1 1 ALB 800 … 1 2 JFK 1000 … 1 3 ORD 1300 … 1 4 LAX 1710 … 2 1 SPI 900 … . . . . . . . . . . . . . . . Travel plans table Airport info table January 17, 2001 Data Mining: Concepts and Techniques 8 Multidimensional Analysis n Strategy n Generalize the planbase in different directions n Look for sequential patterns in the generalized plans n Derive high-level plans A multi-D model for the planbase January 17, 2001 Data Mining: Concepts and Techniques 9 Multidimensional Generalization Plan# Loc_Seq Size_Seq State_Seq 1 ALB - JFK - ORD - LAX - SAN S - L - L - L - S N - N - I - C - C 2 SPI - ORD - JFK - SYR S - L - L - S I - I - N - N . . . . . . . . . Multi-D generalization of the planbase Plan# Size_Seq State_Seq Region_Seq … 1 S - L+ - S N+ - I - C+ E+ - M - P+ … 2 S - L+ - S I+ - N+ M+ - E+ … . . . . . . . . . Merging consecutive, identical actions in plans %]75[)()( ),(_),(_),,( yregionxregion LysizeairportSxsizeairportyxflight =⇒ ∧∧ January 17, 2001 Data Mining: Concepts and Techniques 10 Generalization-Based Sequence Mining n Generalize planbase in multidimensional way using dimension tables n Use # of distinct values (cardinality) at each level to determine the right level of generalization (level- “planning”) n Use operators merge “+”, option “[]” to further generalize patterns n Retain patterns with significant support January 17, 2001 Data Mining: Concepts and Techniques 11 Generalized Sequence Patterns n AirportSize-sequence survives the min threshold (after applying merge operator): S-L+ -S [35%], L+ -S [30%], S-L+ [24.5%], L+ [9%] n After applying option operator: [S] -L+ -[S] [98.5%] n Most of the time, people fly via large airports to get to final destination n Other plans: 1.5% of chances, there are other patterns: S-S, L-S-L January 17, 2001 Data Mining: Concepts and Techniques 12 Chapter 9. Mining Complex Types of Data n Multidimensional analysis and descriptive mining of complex data objects n Mining spatial databases n Mining multimedia databases n Mining time-series and sequence data n Mining text databases n Mining the World-Wide Web n Summary www.jntuworld.com www.jntuworld.com www.jwjobs.net
3. 3. 3 January 17, 2001 Data Mining: Concepts and Techniques 13 Spatial Data Warehousing n Spatial data warehouse: Integrated, subject-oriented, time-variant, and nonvolatile spatial data repository for data analysis and decision making n Spatial data integration: a big issue n Structure-specific formats (raster- vs. vector-based, OO vs. relational models, different storage and indexing, etc.) n Vendor-specific formats (ESRI, MapInfo, Integraph, etc.) n Spatial data cube: multidimensional spatial database n Both dimensions and measures may contain spatial components January 17, 2001 Data Mining: Concepts and Techniques 14 Dimensions and Measures in Spatial Data Warehouse n Dimension modeling n nonspatial n e.g. temperature: 25-30 degrees generalizes to hot n spatial-to-nonspatial n e.g. region “B.C.” generalizes to description “western provinces” n spatial-to-spatial n e.g. region “Burnaby” generalizes to region “Lower Mainland” n Measures n numerical n distributive (e.g. count, sum) n algebraic (e.g. average) n holistic (e.g. median, rank) n spatial n collection of spatial pointers (e.g. pointers to all regions with 25-30 degrees in July) January 17, 2001 Data Mining: Concepts and Techniques 15 Example: BC weather pattern analysis n Input n A map with about 3,000 weather probes scattered in B.C. n Daily data for temperature, precipitation, wind velocity, etc. n Concept hierarchies for all attributes n Output n A map that reveals patterns: merged (similar) regions n Goals n Interactive analysis (drill-down, slice, dice, pivot, roll-up) n Fast response time n Minimizing storage space used n Challenge n A merged region may contain hundreds of “primitive” regions (polygons) January 17, 2001 Data Mining: Concepts and Techniques 16 Star Schema of the BC Weather Warehouse n Spatial data warehouse n Dimensions n region_name n time n temperature n precipitation n Measurements n region_map n area n count FacttableDimension table January 17, 2001 Data Mining: Concepts and Techniques 17 Spatial Merge è Precomputing all: too much storage space è On-line merge: very expensive January 17, 2001 Data Mining: Concepts and Techniques 18 Methods for Computation of Spatial Data Cube n O n-line aggregation: collect and store pointers to spatial objects in a spatial data cube n expensive and slow, need efficient aggregation techniques n Precompute and store all the possible combinations n huge space overhead n Precompute and store rough approximations in a spatial data cube n accuracy trade-off n Selective computation: only materialize those which will be accessed frequently n a reasonable choice www.jntuworld.com www.jntuworld.com www.jwjobs.net
4. 4. 4 January 17, 2001 Data Mining: Concepts and Techniques 19 Spatial Association Analysis n Spatial association rule: A ⇒ B [s%, c% ] n A and B are sets of spatial or nonspatial predicates n Topological relations: intersects, overlaps, disjoint, etc. n Spatial orientations: left_of, west_of, under,etc. n Distance information: close_to, within_distance, etc. n s% is the support and c% is the confidence of the rule n Examples is_a(x, large_town) ^ intersect(x, highway) → adjacent_to(x, water) [7%, 85%] is_a(x, large_town) ^adjacent_to(x, georgia_strait) → close_to(x, u.s.a.) [1%, 78%] January 17, 2001 Data Mining: Concepts and Techniques 20 Progressive Refinement Mining of Spatial Association Rules n Hierarchy of spatial relationship: n g_close_to: near_by, touch, intersect, contain, etc. n First search for rough relationship and then refine it n Two-step mining of spatial association: n Step 1: Rough spatial computation (as a filter) n Using MBR or R-tree for rough estimation n Step2: Detailed spatial algorithm (as refinement) n Apply only to those objects which have passed the rough spatial association test (no less than min_support) January 17, 2001 Data Mining: Concepts and Techniques 21 n Spatial classification n Analyze spatial objects to derive classification schemes, such as decision trees in relevance to certain spatial properties (district, highway, river, etc.) n Example: Classify regions in a province into rich vs. poor according to the average family income n Spatial trend analysis n Detect changes and trends along a spatial dimension n Study the trend of nonspatial or spatial data changing with space n Example: Observe the trend of changes of the climate or vegetation with the increasing distance from an ocean Spatial Classification and Spatial Trend Analysis January 17, 2001 Data Mining: Concepts and Techniques 22 Chapter 9. Mining Complex Types of Data n Multidimensional analysis and descriptive mining of complex data objects n Mining spatial databases n Mining multimedia databases n Mining time-series and sequence data n Mining text databases n Mining the World-Wide Web n Summary January 17, 2001 Data Mining: Concepts and Techniques 23 Similarity Search in Multimedia Data n Description-based retrieval systems n Build indices and perform object retrieval based on image descriptions, such as keywords, captions, size, and time of creation n Labor-intensive if performed manually n Results are typically of poor quality if automated n Content-based retrieval systems n Support retrieval based on the image content, such as color histogram, texture, shape, objects, and wavelet transforms January 17, 2001 Data Mining: Concepts and Techniques 24 Queries in Content-Based Retrieval Systems n Image sample-based queries: n Find all of the images that are similar to the given image sample n Compare the feature vector (signature) extracted from the sample with the feature vectors of images that have already been extracted and indexed in the image database n Image feature specification queries: n Specify or sketch image features like color, texture, or shape, which are translated into a feature vector n Match the feature vector with the feature vectors of the images in the database www.jntuworld.com www.jntuworld.com www.jwjobs.net
5. 5. 5 January 17, 2001 Data Mining: Concepts and Techniques 25 Approaches Based on Image Signature n Color histogram-based signature n The signature includes color histograms based on color composition of an image regardless of its scale or orientation n No information about shape, location, or texture n Two images with similar color composition may contain very different shapes or textures, and thus could be completely unrelated in semantics n Multifeature composed signature n The signature includes a composition of multiple features: color histogram, shape, location, and texture n Can be used to search for similar images January 17, 2001 Data Mining: Concepts and Techniques 26 Wavelet Analysis n Wavelet-based signature n Use the dominant wavelet coefficients of an image as its signature n Wavelets capture shape, texture, and location information in a single unified framework n Improved efficiency and reduced the need for providing multiple search primitives n May fail to identify images containing similar in location or size objects n Wavelet-based signature with region-based granularity n Similar images may contain similar regions, but a region in one image could be a translation or scaling of a matching region in the other n Compute and compare signatures at the granularity of regions, not the entire image January 17, 2001 Data Mining: Concepts and Techniques 27 C-BIRD: Content-Based Image Retrieval from Digital libraries Search nby image colors nby color percentage nby color layout nby texture density nby texture Layout nby object model nby illumination invariance nby keywords January 17, 2001 Data Mining: Concepts and Techniques 28 Multi-Dimensional Search in Multimedia Databases Color layout January 17, 2001 Data Mining: Concepts and Techniques 29 Color histogram Texture layout Multi-Dimensional Analysis in Multimedia Databases January 17, 2001 Data Mining: Concepts and Techniques 30 Refining or combining searches Search for “blue sky” (top layout grid is blue) Search for “blue sky and green meadows” (top layout grid is blue and bottom is green) Search for “airplane in blue sky” (top layout grid is blue and keyword = “airplane”) Mining Multimedia Databases www.jntuworld.com www.jntuworld.com www.jwjobs.net
6. 6. 6 January 17, 2001 Data Mining: Concepts and Techniques 31 Multidimensional Analysis of Multimedia Data n Multimedia data cube n Design and construction similar to that of traditional data cubes from relational data n Contain additional dimensions and measures for multimedia information, such as color, texture, and shape n The database does not store images but their descriptors n Feature descriptor: a set of vectors for each visual characteristic n Color vector: contains the color histogram n MFC (Most Frequent Color) vector: five color centroids n MFO (Most Frequent Orientation) vector: five edge orientation centroids n Layout descriptor: contains a color layout vector and an edge layout vector January 17, 2001 Data Mining: Concepts and Techniques 32 Mining Multimedia Databases in January 17, 2001 Data Mining: Concepts and Techniques 33 RED WHITE BLUE GIFJPEG By Format By Colour Sum Cross Tab RED WHITE BLUE Colour Sum Group By Measurement JPEG GIF Small VeryLarge RED WHITE BLUE By Colour ByFormat&Colour ByFormat&Size ByColour&Size By Format By Size Sum The Data Cube and the Sub-Space Measurements Medium Large • Format of image • Duration • Colors • Textures • Keywords • Size • Width • Height • Internet domain of image • Internet domain of parent pages • Image popularity Mining Multimedia Databases January 17, 2001 Data Mining: Concepts and Techniques 34 Classification in MultiMediaMiner January 17, 2001 Data Mining: Concepts and Techniques 35 n Special features: n Need # of occurrences besides Boolean existence, e.g., n “Two red square and one blue circle” implies theme “air-show” n Need spatial relationships n Blue on top of white squared object is associated with brown bottom n Need multi-resolution and progressive refinement mining n It is expensive to explore detailed associations among objects at high resolution n It is crucial to ensure the completeness of search at multi-resolution space Mining Associations in Multimedia Data January 17, 2001 Data Mining: Concepts and Techniques 36 Spatial Relationships from Layout property P1 next-to property P2property P1 on-top-of property P2 Different Resolution Hierarchy Mining Multimedia Databases www.jntuworld.com www.jntuworld.com www.jwjobs.net
7. 7. 7 January 17, 2001 Data Mining: Concepts and Techniques 37 From Coarse to Fine Resolution Mining Mining Multimedia Databases January 17, 2001 Data Mining: Concepts and Techniques 38 Challenge: Curse of Dimensionality n Difficult to implement a data cube efficiently given a large number of dimensions, especially serious in the case of multimedia data cubes n Many of these attributes are set-oriented instead of single-valued n Restricting number of dimensions may lead to the modeling of an image at a rather rough, limited, and imprecise scale n More research is needed to strike a balance between efficiency and power of representation January 17, 2001 Data Mining: Concepts and Techniques 39 Chapter 9. Mining Complex Types of Data n Multidimensional analysis and descriptive mining of complex data objects n Mining spatial databases n Mining multimedia databases n Mining time-series and sequence data n Mining text databases n Mining the World-Wide Web n Summary January 17, 2001 Data Mining: Concepts and Techniques 40 Mining Time-Series and Sequence Data n Time-series database n Consists of sequences of values or events changing with time n Data is recorded at regular intervals n Characteristic time-series components n Trend, cycle, seasonal, irregular n Applications n Financial: stock price, inflation n Biomedical: blood pressure n Meteorological: precipitation January 17, 2001 Data Mining: Concepts and Techniques 41 Mining Time-Series and Sequence Data Time-series plot January 17, 2001 Data Mining: Concepts and Techniques 42 Mining Time-Series and Sequence Data: Trend analysis n A time series can be illustrated as a time-series graph which describes a point moving with the passage of time n Categories of Time-Series Movements n Long-term or trend movements (trend curve) n Cyclic movements or cycle variations, e.g., business cycles n Seasonal movements or seasonal variations n i.e, almost identical patterns that a time series appears to follow during corresponding months of successive years. n Irregular or random movements www.jntuworld.com www.jntuworld.com www.jwjobs.net
8. 8. 8 January 17, 2001 Data Mining: Concepts and Techniques 43 Estimation of Trend Curve n The freehand method n Fit the curve by looking at the graph n Costly and barely reliable for large-scaled data mining n The least-square method n Find the curve minimizing the sum of the squares of the deviation of points on the curve from the corresponding data points n The moving-average method n Eliminate cyclic, seasonal and irregular patterns n Loss of end data n Sensitive to outliers January 17, 2001 Data Mining: Concepts and Techniques 44 Discovery of Trend in Time-Series (1) n Estimation of seasonal variations n Seasonal index n Set of numbers showing the relative values of a variable during the months of the year n E.g., if the sales during October, November, and December are 80%, 120%, and 140% of the average monthly sales for the whole year, respectively, then 80, 120, and 140 are seasonal index numbers for these months n Deseasonalized data n Data adjusted for seasonal variations n E.g., divide the original monthly data by the seasonal index numbers for the corresponding months January 17, 2001 Data Mining: Concepts and Techniques 45 Discovery of Trend in Time-Series (2) n Estimation of cyclic variations n If (approximate) periodicity of cycles occurs, cyclic index can be constructed in much the same manner as seasonal indexes n Estimation of irregular variations n By adjusting the data for trend, seasonal and cyclic variations n With the systematic analysis of the trend, cyclic, seasonal, and irregular components, it is possible to make long- or short-term predictions with reasonable quality January 17, 2001 Data Mining: Concepts and Techniques 46 Similarity Search in Time-Series Analysis n Normal database query finds exact match n Similarity search finds data sequences that differ only slightly from the given query sequence n Two categories of similarity queries n Whole matching: find a sequence that is similar to the query sequence n Subsequence matching: find all pairs of similar sequences n Typical Applications n Financial market n Market basket data analysis n Scientific databases n Medical diagnosis January 17, 2001 Data Mining: Concepts and Techniques 47 Data transformation n Many techniques for signal analysis require the data to be in the frequency domain n Usually data-independent transformations are used n The transformation matrix is determined a priori n E.g., discrete Fourier transform (DFT), discrete wavelet transform (DWT) n The distance between two signals in the time domain is the same as their Euclidean distance in the frequency domain n DFT does a good job of concentrating energy in the first few coefficients n If we keep only first a few coefficients in DFT, we can compute the lower bounds of the actual distance January 17, 2001 Data Mining: Concepts and Techniques 48 Multidimensional Indexing n Multidimensional index n Constructed for efficient accessing using the first few Fourier coefficients n Use the index can to retrieve the sequences that are at most a certain small distance away from the query sequence n Perform postprocessing by computing the actual distance between sequences in the time domain and discard any false matches www.jntuworld.com www.jntuworld.com www.jwjobs.net
9. 9. 9 January 17, 2001 Data Mining: Concepts and Techniques 49 Subsequence Matching n Break each sequence into a set of pieces of window with length w n Extract the features of the subsequence inside the window n Map each sequence to a “trail” in the feature space n Divide the trail of each sequence into “subtrails” and represent each of them with minimum bounding rectangle n Use a multipiece assembly algorithm to search for longer sequence matches January 17, 2001 Data Mining: Concepts and Techniques 50 Enhanced similarity search methods n Allow for gaps within a sequence or differences in offsets or amplitudes n Normalize sequences with amplitude scaling and offset translation n Two subsequences are considered similar if one lies within an envelope of ε width around the other, ignoring outliers n Two sequences are said to be similar if they have enough non-overlapping time-ordered pairs of similar subsequences n Parameters specified by a user or expert: sliding window size, width of an envelope for similarity, maximum gap, and matching fraction January 17, 2001 Data Mining: Concepts and Techniques 51 Steps for performing a similarity search n Atomic matching n Find all pairs of gap-free windows of a small length that are similar n Window stitching n Stitch similar windows to form pairs of large similar subsequences allowing gaps between atomic matches n Subsequence Ordering n Linearly order the subsequence matches to determine whether enough similar pieces exist January 17, 2001 Data Mining: Concepts and Techniques 52 Query Languages for Time Sequences n Time-sequence query language n Should be able to specify sophisticated queries like Find all of the sequences that are similar to some sequence in class A, but not similar to any sequence in class B n Should be able to support various kinds of queries: range queries, all-pair queries, and nearest neighbor queries n Shape definition language n Allows users to define and query the overall shape of time sequences n Uses human readable series of sequence transitions or macros n Ignores the specific details n E.g., the pattern up, Up, UP can be used to describe increasing degrees of rising slopes n Macros: spike, valley, etc. January 17, 2001 Data Mining: Concepts and Techniques 53 Sequential Pattern Mining n Mining of frequently occurring patterns related to time or other sequences n Sequential pattern mining usually concentrate on symbolic patterns n Examples n Renting “Star Wars”, then “Empire Strikes Back”, then “Return of the Jedi” in that order n Collection of ordered events within an interval n Applications n Targeted marketing n Customer retention n Weather prediction January 17, 2001 Data Mining: Concepts and Techniques 54 Mining Sequences (cont.) CustId Video sequence 1 {(C), (H)} 2 {(AB), (C), (DFG)} 3 {(CEG)} 4 {(C), (DG), (H)} 5 {(H)} Customer-sequence Sequential patterns with support > 0.25 {(C), (H)} {(C), (DG)} Map Large Itemsets Large Itemsets MappedID (C) 1 (D) 2 (G) 3 (DG) 4 (H) 5 www.jntuworld.com www.jntuworld.com www.jwjobs.net
10. 10. 10 January 17, 2001 Data Mining: Concepts and Techniques 55 Sequential pattern mining: Cases and Parameters n Duration of a time sequence T n Sequential pattern mining can then be confined to the data within a specified duration n Ex. Subsequence corresponding to the year of 1999 n Ex. Partitioned sequences, such as every year, or every week after stock crashes, or every two weeks before and after a volcano eruption n Event folding window w n If w = T, time-insensitive frequent patterns are found n If w = 0 (no event sequence folding), sequential patterns are found where each event occurs at a distinct time instant n If 0 < w < T, sequences occurring within the same period w are folded in the analysis January 17, 2001 Data Mining: Concepts and Techniques 56 Sequential pattern mining: Cases and Parameters (2) n Time interval, int, between events in the discovered pattern n int = 0: no interval gap is allowed, i.e., only strictly consecutive sequences are found n Ex. “Find frequent patterns occurring in consecutive weeks” n min_int ≤ int ≤ max_int: find patterns that are separated by at least min_int but at most max_int n Ex. “If a person rents movie A, it is likely she will rent movie B within 30 days” (int ≤ 30) n int = c ≠ 0: find patterns carrying an exact interval n Ex. “Every time when Dow Jones drops more than 5%, what will happen exactly two days later?” (int = 2) January 17, 2001 Data Mining: Concepts and Techniques 57 Episodes and Sequential Pattern Mining Methods n Other methods for specifying the kinds of patterns n Serial episodes: A → B n Parallel episodes: A & B n Regular expressions: (A | B)C*(D → E) n Methods for sequential pattern mining n Variations of Apriori-like algorithms, e.g., GSP n Database projection-based pattern growth n Similar to the frequent pattern growth without candidate generation January 17, 2001 Data Mining: Concepts and Techniques 58 Periodicity Analysis n Periodicity is everywhere: tides, seasons, daily power consumption, etc. n Full periodicity n Every point in time contributes (precisely or approximately) to the periodicity n Partial periodicit: A more general notion n Only some segments contribute to the periodicity n Jim reads NY Times 7:00-7:30 am every week day n Cyclic association rules n Associations which form cycles n Methods n Full periodicity: FFT, other statistical analysis methods n Partial and cyclic periodicity: Variations of Apriori-like mining methods January 17, 2001 Data Mining: Concepts and Techniques 59 Chapter 9. Mining Complex Types of Data n Multidimensional analysis and descriptive mining of complex data objects n Mining spatial databases n Mining multimedia databases n Mining time-series and sequence data n Mining text databases n Mining the World-Wide Web n Summary January 17, 2001 Data Mining: Concepts and Techniques 60 Text Databases and IR n Text databases (document databases) n Large collections of documents from various sources: news articles, research papers, books, digital libraries, e-mail messages, and Web pages, library database, etc. n Data stored is usually semi-structured n Traditional information retrieval techniques become inadequate for the increasingly vast amounts of text data n Information retrieval n A field developed in parallel with database systems n Information is organized into (a large number of) documents n Information retrieval problem: locating relevant documents based on user input, such as keywords or example documents www.jntuworld.com www.jntuworld.com www.jwjobs.net
11. 11. 11 January 17, 2001 Data Mining: Concepts and Techniques 61 Information Retrieval n Typical IR systems n Online library catalogs n Online document management systems n Information retrieval vs. database systems n Some DB problems are not present in IR, e.g., update, transaction management, complex objects n Some IR problems are not addressed well in DBMS, e.g., unstructured documents, approximate search using keywords and relevance January 17, 2001 Data Mining: Concepts and Techniques 62 Basic Measures for Text Retrieval n Precision: the percentage of retrieved documents that are in fact relevant to the query (i.e., “correct” responses) n Recall: the percentage of documents that are relevant to the query and were, in fact, retrieved |}{| |}{}{| Relevant RetrievedRelevant precision ∩ = |}{| |}{}{| Retrieved RetrievedRelevant precision ∩ = January 17, 2001 Data Mining: Concepts and Techniques 63 Keyword-Based Retrieval n A document is represented by a string, which can be identified by a set of keywords n Queries may use expressions of keywords n E.g., car and repair shop, tea or coffee, DBMS but not Oracle n Queries and retrieval should consider synonyms, e.g., repair and maintenance n Major difficulties of the model n Synonymy : A keyword T does not appear anywhere in the document, even though the document is closely related to T, e.g., data mining n Polysemy : The same keyword may mean different things in different contexts, e.g., mining January 17, 2001 Data Mining: Concepts and Techniques 64 Similarity-Based Retrieval in Text Databases n Finds similar documents based on a set of common keywords n Answer should be based on the degree of relevance based on the nearness of the keywords, relative frequency of the keywords, etc. n Basic techniques n Stop list n Set of words that are deemed “irrelevant”, even though they may appear frequently n E.g., a, the, of, for, with, etc. n Stop lists may vary when document set varies January 17, 2001 Data Mining: Concepts and Techniques 65 Similarity-Based Retrieval in Text Databases (2) n Word stem n Several words are small syntactic variants of each other since they share a common word stem n E.g., drug, drugs, drugged n A term frequency table n Each entry frequent_table(i, j) = # of occurrences of the word ti in document di n Usually, the ratio instead of the absolute number of occurrences is used n Similarity metrics: measure the closeness of a document to a query (a set of keywords) n Relative term occurrences n Cosine distance: |||| ),( 21 21 21 vv vv vvsim ⋅ = January 17, 2001 Data Mining: Concepts and Techniques 66 Latent Semantic Indexing n Basic idea n Similar documents have similar word frequencies n Difficulty: the size of the term frequency matrix is very large n Use a singular value decomposition (SVD) techniques to reduce the size of frequency table n Retain the K most significant rows of the frequency table n Method n Create a term frequency matrix, freq_matrix n SVD construction: Compute the singular valued decomposition of freq_matrix by splitting it into 3 matrices, U, S, V n Vector identification: For each document d, replace its original document vector by a new excluding the eliminated terms n Index creation: Store the set of all vectors, indexed by one of a number of techniques (such as TV-tree) www.jntuworld.com www.jntuworld.com www.jwjobs.net
12. 12. 12 January 17, 2001 Data Mining: Concepts and Techniques 67 Other Text Retrieval Indexing Techniques n Inverted index n Maintains two hash- or B+-tree indexed tables: n document_table: a set of document records <doc_id, postings_list> n term_table: a set of term records, <term, postings_list> n Answer query: Find all docs associated with one or a set of terms n Advantage: easy to implement n Disadvantage: do not handle well synonymy and polysemy, and posting lists could be too long (storage could be very large) n Signature file n Associate a signature with each document n A signature is a representation of an ordered list of terms that describe the document n Order is obtained by frequency analysis, stemming and stop lists January 17, 2001 Data Mining: Concepts and Techniques 68 Types of Text Data Mining n Keyword-based association analysis n Automatic document classification n Similarity detection n Cluster documents by a common author n Cluster documents containing information from a common source n Link analysis: unusual correlation between entities n Sequence analysis: predicting a recurring event n Anomaly detection: find information that violates usual patterns n Hypertext analysis n Patterns in anchors/links n Anchor text correlations with linked objects January 17, 2001 Data Mining: Concepts and Techniques 69 Keyword-based association analysis n Collect sets of keywords or terms that occur frequently together and then find the association or correlation relationships among them n First preprocess the text data by parsing, stemming, removing stop words, etc. n Then evoke association mining algorithms n Consider each document as a transaction n View a set of keywords in the document as a set of items in the transaction n Term level association mining n No need for human effort in tagging documents n The number of meaningless results and the execution time is greatly reduced January 17, 2001 Data Mining: Concepts and Techniques 70 Automatic document classification n Motivation n Automatic classification for the tremendous number of on-line text documents (Web pages, e-mails, etc.) n A classification problem n Training set: Human experts generate a training data set n Classification: The computer system discovers the classification rules n Application: The discovered rules can be applied to classify new/unknown documents n Text document classification differs from the classification of relational data n Document databases are not structured according to attribute-value pairs January 17, 2001 Data Mining: Concepts and Techniques 71 Association-Based Document Classification n Extract keywords and terms by information retrieval and simple association analysis techniques n Obtain concept hierarchies of keywords and terms using n Available term classes, such as WordNet n Expert knowledge n Some keyword classification systems n Classify documents in the training set into class hierarchies n Apply term association mining method to discover sets of associated terms n Use the terms to maximally distinguish one class of documents from others n Derive a set of association rules associated with each document class n Order the classification rules based on their occurrence frequency and discriminative power n Used the rules to classify new documents January 17, 2001 Data Mining: Concepts and Techniques 72 Document Clustering n Automatically group related documents based on their contents n Require no training sets or predetermined taxonomies, generate a taxonomy at runtime n Major steps n Preprocessing n Remove stop words, stem, feature extraction, lexical analysis, … n Hierarchical clustering n Compute similarities applying clustering algorithms, … n Slicing n Fan out controls, flatten the tree to configurable number of levels, … www.jntuworld.com www.jntuworld.com www.jwjobs.net
13. 13. 13 January 17, 2001 Data Mining: Concepts and Techniques 73 Chapter 9. Mining Complex Types of Data n Multidimensional analysis and descriptive mining of complex data objects n Mining spatial databases n Mining multimedia databases n Mining time-series and sequence data n Mining text databases n Mining the World-Wide Web n Summary January 17, 2001 Data Mining: Concepts and Techniques 74 Mining the World-Wide Web n The WWW is huge, widely distributed, global information service center for n Information services: news, advertisements, consumer information, financial management, education, government, e-commerce, etc. n Hyper-link information n Access and usage information n WWW provides rich sources for data mining n Challenges n Too huge for effective data warehousing and data mining n Too complex and heterogeneous: no standards and structure January 17, 2001 Data Mining: Concepts and Techniques 75 Mining the World-Wide Web n Growing and changing very rapidly n Broad diversity of user communities n Only a small portion of the information on the Web is truly relevant or useful n 99% of the Web information is useless to 99% of Web users n How can we find high-quality Web pages on a specified topic? Internet growth 0 5000000 10000000 15000000 20000000 25000000 30000000 35000000 40000000 Sep-69 Sep-72 Sep-75 Sep-78 Sep-81 Sep-84 Sep-87 Sep-90 Sep-93 Sep-96 Sep-99 Hosts January 17, 2001 Data Mining: Concepts and Techniques 76 Web search engines n Index-based: search the Web, index Web pages, and build and store huge keyword-based indices n Help locate sets of Web pages containing certain keywords n Deficiencies n A topic of any breadth may easily contain hundreds of thousands of documents n Many documents that are highly relevant to a topic may not contain keywords defining them (polysemy ) January 17, 2001 Data Mining: Concepts and Techniques 77 Web Mining: A more challenging task n Searches for n Web access patterns n Web structures n Regularity and dynamics of Web contents n Problems n The “abundance” problem n Limited coverage of the Web: hidden Web sources, majority of data in DBMS n Limited query interface based on keyword-oriented search n Limited customization to individual users January 17, 2001 Data Mining: Concepts and Techniques 78 Web Mining Web Structure Mining Web Content Mining Web Page Content Mining Search Result Mining Web Usage Mining General Access Pattern Tracking Customized Usage Tracking Web Mining Taxonomy www.jntuworld.com www.jntuworld.com www.jwjobs.net
14. 14. 14 January 17, 2001 Data Mining: Concepts and Techniques 79 Web Mining Web Structure Mining Web Content Mining Web Page Content Mining Web Page Summarization WebLog (Lakshmanan et.al. 1996), WebOQL(Mendelzon et.al. 1998) …: Web Structuring query languages; Can identify information within given web pages •Ahoy! (Etzioniet.al. 1997):Uses heuristics to distinguish personal home pages from other web pages •ShopBot (Etzioni et.al. 1997): Looks for product prices within web pages Search Result Mining Web Usage Mining General Access Pattern Tracking Customized Usage Tracking Mining the World-Wide Web January 17, 2001 Data Mining: Concepts and Techniques 80 Web Mining Mining the World-Wide Web Web Usage Mining General Access Pattern Tracking Customized Usage Tracking Web Structure Mining Web Content Mining Web Page Content Mining Search Result Mining Search Engine Result Summarization •Clustering Search Result (Leouski and Croft, 1996, Zamir and Etzioni, 1997): Categorizes documents using phrases in titles and snippets January 17, 2001 Data Mining: Concepts and Techniques 81 Web Mining Web Content Mining Web Page Content Mining Search Result Mining Web Usage Mining General Access Pattern Tracking Customized Usage Tracking Mining the World-Wide Web Web Structure Mining Using Links •PageRank (Brin et al., 1998) •CLEVER (Chakrabarti et al., 1998) Use interconnections between web pages to give weight to pages. Using Generalization •MLDB (1994), VWV (1998) Uses a multi-level database representation of the Web. Counters (popularity) and link lists are used for capturing structure. January 17, 2001 Data Mining: Concepts and Techniques 82 Web Mining Web Structure Mining Web Content Mining Web Page Content Mining Search Result Mining Web Usage Mining General Access Pattern Tracking •Web Log Mining (Zaïane,Xin and Han, 1998) Uses KDD techniques to understand general access patterns and trends. Can shed light on better structure and grouping of resource providers. Customized Usage Tracking Mining the World-Wide Web January 17, 2001 Data Mining: Concepts and Techniques 83 Web Mining Web Usage Mining General Access Pattern Tracking Customized Usage Tracking •Adaptive Sites (Perkowitz and Etzioni, 1997) Analyzes access patterns of each user at a time. Web site restructures itself automatically by learning from user access patterns. Mining the World-Wide Web Web Structure Mining Web Content Mining Web Page Content Mining Search Result Mining January 17, 2001 Data Mining: Concepts and Techniques 84 Mining the Web's Link Structures n Finding authoritative Web pages n Retrieving pages that are not only relevant, but also of high quality, or authoritative on the topic n Hyperlinks can infer the notion of authority n The Web consists not only of pages, but also of hyperlinks pointing from one page to another n These hyperlinks contain an enormous amount of latent human annotation n A hyperlink pointing to another Web page, this can be considered as the author's endorsement of the other page www.jntuworld.com www.jntuworld.com www.jwjobs.net