Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, 1999.9 Data Mining and Data Warehousing v Introduction v Data warehousing and OLAP.

Similar presentations


Presentation on theme: "1 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, 1999.9 Data Mining and Data Warehousing v Introduction v Data warehousing and OLAP."— Presentation transcript:

1 1 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Mining and Data Warehousing v Introduction v Data warehousing and OLAP for data mining v Data preprocessing v Primitives for data mining v Concept description v Mining association rules in large databases v Classification and prediction v Cluster analysis v Mining complex types of data  Applications and trends in data mining

2 2 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Mining and Warehousing: Session 2 Data Warehouse and OLAP Technology for Data Mining

3 3 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Session 2: Data Warehousing and OLAP Technology for Data Mining v What is a data warehouse? v A multi-dimensional data model v Data warehouse architecture v Data warehouse implementation v Further development of data cube technology v From data warehousing to data mining

4 4 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Motivation v Data has been collected everywhere and in huge amounts — how to make good use of your data? v Bring together scattered information from multiple sources as to provide a consistent database source for decision support. v Provide tools for business executives to systematically organize, understand, and use their data to make strategic decisions.

5 5 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, What is a Data Warehouse? v Defined in many different ways, but not rigorously. V A decision support database that is maintained separately from the organization’s operational database V Support information processing by providing a solid platform of consolidated, historical data for analysis. v “A data warehouse is a subject-oriented, integrated, time-variant, and nonvolatile collection of data in support of management’s decision- making process.” — W. H. Inmon v Data warehousing: V The process of constructing and using data warehouses

6 6 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse — Subject Oriented v Organized around major subjects of interests, such as profit, product, sales. v Focusing on the modeling and analysis of data for decision makers, not on daily operations or transaction processing. v Provide a simple and concise view around particular subject issues by excluding data that are not useful in the decision support process.

7 7 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse — Integrated v Integrate multiple, heterogeneous data sources V relational databases, flat files, on-line transaction records v Data cleaning and data integration techniques are applied. V Ensure consistency in naming conventions, encoding structures, attribute measures, etc. among different data sources –E.g., Hotel price: currency, tax, breakfast covered, etc. V When data is moved to the warehouse, it is converted.

8 8 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse — Time Variant v The time horizon for the data warehouse is significantly longer than that of operational systems. V Operational database: current value data. V Data warehouse data: provide information from a historical perspective (e.g., past 5-10 years) v Every key structure in the data warehouse V Contains an element of time, explicitly or implicitly

9 9 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse — Non-Volatile v A physically separate store of data transformed from the operational environment. v Operational update of data does not occur in the data warehouse environment. (May update monthly) V Does not require transaction processing, recovery, and concurrency control mechanisms V Requires only two operations in data accessing: –initial loading of data and access of data.

10 10 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse vs. Heterogeneous DBMS v Traditional heterogeneous DB integration: V Build wrappers/mediators on top of heterogeneous databases V Query driven approach: –When a query is posed to a client site, a meta-dictionary is used to translate the query into queries appropriate for individual heterogeneous sites involved, and the results are integrated into a global answer set. –Complex information filtering, compete for sources v Data warehouse: high performance, simpler to use

11 11 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse vs. Operational DB Systems v Major task of traditional relational DBMS V OLTP (on-line transaction processing) V Day-to-day operations: purchasing, inventory, banking, manufacturing, payroll, registration, accounting, etc. v Major task of data warehouse system V OLAP (on-line analytical processing) V Data analysis and decision making

12 12 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, OLTP vs. OLAP

13 13 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Why Separate Data Warehouse? v High performance for both systems: V DBMS — tuned for OLTP: access methods, indexing, concurrency control, recovery V Warehouse — tuned for OLAP: complex OLAP queries, multidimensional view, consolidation. v Different functions and different data: V data source: Decision support requires historical data which operational DBs do not typically maintain V data consolidation: DS requires consolidation (aggregation, summarization) of data from heterogeneous sources V data quality: different sources typically use inconsistent data representations, codes and formats which have to be reconciled.

14 14 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Session 2: Data Warehousing and OLAP v What is a data warehouse? v A multi-dimensional data model v Data warehouse architecture v Data warehouse implementation v Further development of data cube technology v From data warehousing to data mining

15 15 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Multidimensional Data for OLAP v Sales volume as a function of product, month, and region Product Region Month

16 16 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Aggregate with lower dimension Cuboids all product date country product,dateproduct,countrydate, country product, date, country 0-D(apex) cuboid 1-D cuboids 2-D cuboids 3-D(base) cuboid

17 17 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Cube: A Lattice of Cuboids all timeitemlocationsupplier time,itemtime,location time,supplier item,location item,supplier location,supplier time,item,location time,item,supplier time,location,supplier item,location,supplier time, item, location, supplier 0-D(apex) cuboid 1-D cuboids 2-D cuboids 3-D cuboids 4-D(base) cuboid

18 18 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, A concept hierarchy: Aggregate on dimension (location) all EuropeNorth_America MexicoCanadaSpainGermany Vancouver M. YoungL. Chan... all region office country TorontoFrankfurtcity

19 19 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, A Sample Data Cube Total annual sales of TV in U.S.A. Date Product Country sum TV VCR PC 1Qtr 2Qtr 3Qtr 4Qtr U.S.A Canada Mexico sum

20 20 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Measures: Three Categories of Measures v distributive: if the result derived by applying the function to n aggregate values is the same as that derived by applying the function on all the data without partitioning. –E.g., count(), sum(), min(), max(). v algebraic: if it can be computed by an algebraic function with M arguments (where M is a bounded integer), each of which is obtained by applying a distributive aggregate function. –E.g., avg(), min_N(), standard_deviation(). v holistic: if there is no constant bound on the storage size needed to describe a subaggregate. –E.g., median(), mode(), rank().

21 21 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Typical OLAP Operations v Roll up (drill-up): summarize data V by climbing up hierarchy or by dimension reduction v Drill down (roll down): reverse of roll-up V from higher level summary to lower level summary or detailed data, or introducing new dimensions v Slice and dice: V project and select v Pivot (rotate): V reorient the cube, visualization, 3D to series of 2D planes. v Other operations V drill across: involving (across) more than one fact table. V drill through: through the bottom level to its back-end relational tables.

22 22 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Conceptual Modeling of Data Warehouses v Modeling data warehouses: dimensions & measurements V Star schema: A single object (fact table) in the middle connected to a number of objects (dimension tables) V Snowflake schema: A refinement of star schema where the dimensional hierarchy is represented explicitly by normalizing the dimension tables. V Fact constellations: Multiple fact tables share dimension tables.

23 23 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Example of Star Schema Day Month Year Date CustId CustName CustCity CustCountry Cust Sales Fact Table Date Product Store Customer unit_sales dollar_sales Yen_sales Measurements ProductNo ProdName ProdDesc Category QOH Product StoreID City State Country Region Store

24 24 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Example of Snowflake Schema Day Month Date CustId CustName CustCity CustCountry Cust Sales Fact Table Date Product Store Customer unit_sales dollar_sales Yen_sales Measurements ProductNo ProdName ProdDesc Category QOH Product Month Year Month Year City State City Country Region Country State Country State StoreID City Store

25 25 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, A Star-Net Query Model Shipping Method AIR-EXPRESS TRUCK ORDER Customer Orders CONTRACTS Customer Product PRODUCT GROUP PRODUCT LINE PRODUCT ITEM SALES PERSON DISTRICT DIVISION OrganizationPromotion CITY COUNTRY REGION Location DAILYQTRLYANNUALY Time

26 26 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Session 2: Data Warehousing and OLAP Technology for Data Mining v What is a data warehouse? v A multi-dimensional data model v Data warehouse architecture v Data warehouse implementation v Further development of data cube technology v From data warehousing to data mining

27 27 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Design of a Data Warehouse: A Business Analysis Framework v Four different views regarding the design of a data warehouse must be considered v Top-down view: V Allows selection of the relevant information necessary for the data warehouse. v Data source view: V exposes the information being captured, stored, and managed by operational systems v Data warehouse view: V fact tables and dimension tables v Business query view: V perspectives of data in the warehouse from the view of end-user.

28 28 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, The Process of Data Warehouse Design v Top-down, bottom-up approaches or a combination of both V Top-down: Starts with overall design and planning (mature) V Bottom-up: Starts with experiments and prototypes (rapid) v From software engineering point of view V Waterfall: structured and systematic analysis at each step before proceeding to the next. V Spiral: rapid generation of increasingly functional systems, short turn around time, quick turn around. v Typical data warehouse design process: V Choose a business process to model, e.g., orders, invoices, etc. V Choose the grain (atomic level of data) of the business process V Choose the dimensions that will apply to each fact table record V Choose the measure that will populate each fact table record.

29 29 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Multi-Tiered Architecture Data Warehouse Extract Transform Load Refresh OLAP Engine Analysis Query Reports Data mining Monitor & Integrator Metadata Data Sources Front-End Tools Serve Data Marts Operational DBs other sources Data Storage OLAP Server

30 30 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Three-Tier Data Warehouse Architecture v Enterprise warehouse: V collects all of the information about subjects spanning the entire organization. v Data Mart: V a subset of corporate-wide data that is of value to a specific groups of users. Its scope is confined to specific, selected groups, such as marketing data mart. –Independent vs. dependent (directly from warehouse) data mart v Virtual warehouse: V A set of views over operational databases. V Only some of the possible summary views may be materialized.

31 31 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse Development: A Recommended Approach Define a high-level corporate data model Data Mart Distributed Data Marts Multi-Tier Data Warehouse Enterprise Data Warehouse Model refinement

32 32 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, OLAP Server Architectures v Relational OLAP (ROLAP): V Use relational or extended-relational DBMS to store and manage warehouse data and OLAP middle ware to support missing pieces. V Include optimization of DBMS backend, implementation of aggregation navigation logic, and additional tools and services V greater scalability v Multidimensional OLAP (MOLAP): V Array-based multidimensional storage engine (sparse matrix techniques) V fast indexing to pre-computed summarized data v Hybrid OLAP (HOLAP): V User flexibility, e.g., low level: relational, high-level: array. v Specialized SQL servers: V specialized support for SQL queries over star.snowflake schemas

33 33 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Session 2: Data Warehousing and OLAP Technology for Data Mining v What is a data warehouse? v A multi-dimensional data model v Data warehouse architecture v Data warehouse implementation v Further development of data cube technology v From data warehousing to data mining

34 34 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Efficient Data Cube Computation v Data cube can be viewed as a lattice of cuboids V The bottom-most cuboid is the base cuboid. V The top-most cuboid (apex) contains only one cell. V How many cuboids in an n-dimensional cube with L levels? v Materialization of data cube V Materialize every (cuboid), none, or some. V Algorithms for selection of which cuboids to materialize. –Based on size, sharing, access frequency, etc. v Efficient cube computation methods V ROLAP-based cubing algorithms. V Array-based cubing algorithm.

35 35 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Cube Operation v Cube definition and computation in DMQL define cube sales[item, city, year]: sum(sales_in_dollars) computer cube sales v Transform it into a SQL-like language (with a new operator cube by, introduced by Gray et al.’96) SELECT item, city, year, SUM (amount) FROM SALES CUBE BY item, city, year v Need compute the following Group-Bys (date, product, customer), (date,product),(date, customer), (product, customer), (date), (product), (customer) () (item)(city) () (year) (city, item)(city, year)(item, year) (city, item, year)

36 36 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Cube Computation: ROLAP-Based Method v Hash/sort based methods ( Agarwal et. al. VLDB’96 ) V Smallest-parent: computing a cuboid from the smallest cubod previously computed cuboid. V Cache-results: caching results of a cuboid from which other cuboids are computed to reduce disk I/Os. V Amortize-scans: computing as many as possible cuboids at the same time to amortize disk reads. V Share-sorts: sharing sorting costs cross multiple cuboids when sort-based method is used. V Share-partitions: sharing the partitioning cost cross multiple cuboids when hash-based algorithms are used.

37 37 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Multi-way Array Aggregation for Cube Computation v Partition arrays into chunks (small subcube fit in memory). v Compressed sparse array addressing: (chunk_id, offset) v Compute aggregates in “multiway” by visiting cube cells in the order which minimize # of times to visit each cell, reduce memory access and storage cost. What is the best traversing order to do multiway aggregation? A B a1a0 c3 c2 c1 c 0 b3 b2 b1 b0 a2a3 C B

38 38 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Multi-way Array Aggregation for Cube Computation A B a1a0 c3 c2 c1 c 0 b3 b2 b1 b0 a2a3 C B

39 39 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Multi-way Array Aggregation for Cube Computation A B a1a0 c3 c2 c1 c 0 b3 b2 b1 b0 a2a3 C B

40 40 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Multi-way Array Aggregation for Cube Computation(Cont.) v Conclusion: the planes should be sorted and computed according to their size in ascending order. V E.g. if |AB| < |AC| < |BC| then first compute AB then AC then BC. v The same for 1-D planes. V E.g. if |A| < |B| < |C| then first compute A then B then C.

41 41 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Indexing OLAP Data: Bitmap Index v Index on a particular column v Each value in the column has a bit vector: bit-op is fast v The length of the bit vector: # of records in the base table v The i-th bit is set if the i-th row of the base table has the value for the indexed column v not suitable for high cardinality domains Base table Index on RegionIndex on Type

42 42 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Indexing OLAP Data: Join Indexes v Traditional indexes map the vales to a list of record ids. v Join indexes map the tuples in the join result of two relations to the source tables. v In data warehouse cases, join indexes relate the values of the dimensions of a start schema to rows in the fact table. V For a warehouse with a Sales fact table and two dimensions city and product, a join index on city maintains for each distinct city a list of RIDs of the tuples recording the sales in the city V Join indexes can span multiple dimensions

43 43 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Efficient Processing OLAP Queries v Determine which operations should be performed on the available cuboids: V transform drill, roll, etc. infro corresponding SQL and/or OLAP operations, e.g, dice = selection + projection v Determine to which materialized cuboid(s) the relevant operations should be applied. v Exploring indexing structures and compressed vs. dense array structures in MOLAP

44 44 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Metadata Repository v Meta data are the data defining warehouse objects v Description the structure of the warehouse V schema, view, dimensions, hierarchies, derived data defn, data mart locations and contents v Operational meta-data V data lineage (history of migrated data and transformation path), currency of data (active, archived, or purged), monitoring information (warehouse usage statistics, error reports, audit trails) v The algorithms used for summarization v The mapping from operational environment to the data warehouse v Data related to system performance V warehouse schema, view and derived data definitions v Business data V business terms and definitions, ownership of data, charging policies

45 45 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse Back-End Tools and Utilities v Data extraction: V get data from multiple, heterogeneous, and external sources v Data cleaning: V detect errors in the data and rectify them when possible v Data transformation: V convert data from legacy or host format to warehouse format v Load: V sort, summarize, consolidate, compute views, check integrity, and build indicies and partitions v Refresh V propagate the updates from the data sources to the warehouse

46 46 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Session 2: Data Warehousing and OLAP Technology for Data Mining v What is a data warehouse? v A multi-dimensional data model v Data warehouse architecture v Data warehouse implementation v Further development of data cube technology v From data warehousing to data mining

47 47 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Discovery-Driven Exploration of Data Cubes v Hypothesis-driven: exploration by user, huge search space v Discovery-driven (Sarawagi et al.’98): V pre-compute measures indicating exceptions, guide user in the data analysis, at all levels of aggregation. V Exception: significantly different from the value anticipated, based on a statistical model. V Visual cues such as background color are used to reflect the degree of exception of each cell. V Computation of exception indicator (modeling fitting and computing SelfExp, InExp, and PathExp values) can be overlapped with cube construction

48 48 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Session 2: Data Warehousing and OLAP Technology for Data Mining v What is a data warehouse? v A multi-dimensional data model v Data warehouse architecture v Data warehouse implementation v Further development of data cube technology v From data warehousing to data mining

49 49 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, Data Warehouse Usage v Three kinds of data warehouse applications V Information processing –supports querying, basic statistical analysis, and reporting using crosstabs, tables, charts and graphs V Analytical processing –multidimensional analysis of data warehouse data –supports basic OLAP operations, slice-dice, drilling, pivoting V Data mining –knowledge discovery from hidden patterns –supports associations, constructing analytical models, performing classification and prediction, and presenting the mining results using visualization tools. v Differences among the three tasks

50 50 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, From On-Line Analytical Processing to On Line Analytical Mining v Why online analytical mining? V High quality of data in data warehouses –DW contains integrated, consistent, cleaned data V Available information processing structure surrounding data warehouses –ODBC, OLEDB, Web accessing, service facilities, reporting and OLAP tools V OLAP-based exploratory data analysis –mining with drilling, dicing, pivoting, etc. V On-line selection of data mining functions –integration and swapping of multiple mining functions, algorithms, and tasks. v Architecture of OLAM

51 51 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, An OLAM Architecture Data Warehouse Meta Data MDDB OLAM Engine OLAP Engine User GUI API Data Cube API Database API Data cleaning Data integration Layer3 OLAP/OLAM Layer2 MDDB Layer1 Data Repository Layer4 User Interface Filtering&IntegrationFiltering Databases Mining queryMining result


Download ppt "1 Copyright Jiawei Han. Modified by Charles Ling for CS411a/538a, UWO, 1999.9 Data Mining and Data Warehousing v Introduction v Data warehousing and OLAP."

Similar presentations


Ads by Google