Sunday, January 6, 2008

Data Mining and Warehousing 05-01-2008

Chapter 2: Data Warehousing and OLAP Technology for Data Mining
What is a data warehouse?
A multi-dimensional data model
Data warehouse architecture
Data warehouse implementation
Further development of data cube technology
From data warehousing to data mining
What is Data Warehouse?
Defined in many different ways, but not rigorously.
A decision support database that is maintained separately from the organization’s operational database
Support information processing by providing a solid platform of consolidated, historical data for analysis.
“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
Data warehousing:
The process of constructing and using data warehouses
Data Warehouse—Subject-Oriented
Provide a simple and concise view around particular subject issues by excluding data that are not useful in the decision support process.
Organized around major subjects, such as customer, product, sales.
Focusing on the modeling and analysis of data for decision makers, not on daily operations or transaction processing.
Data Warehouse—Integrated
Constructed by integrating multiple, heterogeneous data sources
relational databases, flat files, on-line transaction records
Data cleaning and data integration techniques are applied.
Ensure consistency in naming conventions, encoding structures, attribute measures, etc. among different data sources
E.g., Hotel price: currency, tax, breakfast covered, etc.
When data is moved to the warehouse, it is converted.
Data Warehouse—Time Variant
The time horizon for the data warehouse is significantly longer than that of operational systems.
Operational database: current value data.
Data warehouse data: provide information from a historical perspective (e.g., past 5-10 years)
Every key structure in the data warehouse
Contains an element of time, explicitly or implicitly
However, the key of operational data may or may not contain “time element”.
Data Warehouse—Non-Volatile
A physically separate store of data transformed from the operational environment.
Operational update of data does not necessarily occur in the data warehouse environment.
Does not require transaction processing, recovery, and concurrency control mechanisms
Often requires only two operations in data accessing:
initial loading of data and access of data.
Data Warehouse vs. Heterogeneous DBMS
Traditional heterogeneous DB integration:
Build wrappers/mediators on top of heterogeneous databases
Query driven approach
A query posed to a client site is translated into queries appropriate for individual heterogeneous sites; The results are integrated into a global answer set
Involving complex information filtering
Competition for resources at local sources
Data warehouse: update-driven, high performance
Information from heterogeneous sources is integrated in advance and stored in warehouses for direct query and analysis
Data Warehouse vs. Operational DBMS
OLTP (on-line transaction processing)
Major task of traditional relational DBMS
Day-to-day operations: purchasing, inventory, banking, manufacturing, payroll, registration, accounting, etc.
OLAP (on-line analytical processing)
Major task of data warehouse system
Data analysis and decision making
Distinct features (OLTP vs. OLAP):
User and system orientation: customer vs. market
Data contents: current, detailed vs. historical, consolidated
Database design: ER + application vs. star + subject
View: current, local vs. evolutionary, integrated
Access patterns: update vs. read-only but complex queries
Why Separate Data Warehouse?
High performance for both systems
DBMS— tuned for OLTP: access methods, indexing, concurrency control, recovery
Warehouse—tuned for OLAP: complex OLAP queries, multidimensional view, consolidation.
Different functions and different data:
Decision support requires historical data which operational DBs do not typically maintain
Decision Support requires consolidation (aggregation, summarization) of data from heterogeneous sources
Different sources typically use inconsistent data representations, codes and formats which have to be reconciled
Chapter 2: Data Warehousing and OLAP Technology for Data Mining
What is a data warehouse?
A multi-dimensional data model
Data warehouse architecture
Data warehouse implementation
Further development of data cube technology
From data warehousing to data mining
A Multi-Dimensional Data Model
A data warehouse is based on a multidimensional data model which views data in the form of a data cube
A data cube allows data to be modeled and viewed in multiple dimensions
Dimension tables, such as item (item_name, brand, type), or time(day, week, month, quarter, year)
Fact table contains measures (such as dollars_sold) and keys to each of the related dimension tables
In data warehousing literature, an n-D base cube is called a base cuboid. The top most 0-D cuboid, which holds the highest-level of summarization, is called the apex cuboid. The lattice of cuboids forms a data cube.
A Sample Data Cube
4-D Data Cube
Cube: A Lattice of Cuboids
Conceptual Modeling of Data Warehouses
Modeling data warehouses: dimensions & measures
Star schema: A fact table in the middle connected to a set of dimension tables
Snowflake schema: A refinement of star schema where some dimensional hierarchy is normalized into a set of smaller dimension tables, forming a shape similar to snowflake
Fact constellations: Multiple fact tables share dimension tables, viewed as a collection of stars, therefore called galaxy schema or fact constellation
Example of Star Schema

Example of Snowflake Schema
Example of Fact Constellation
A Data Mining Query Language, DMQL: Language Primitives
Cube Definition (Fact Table)
define cube []:
Dimension Definition (Dimension Table)
define dimension as ()
Special Case (Shared Dimension Tables)
First time as “cube definition”
define dimension as in cube

Defining a Star Schema in DMQL
define cube sales_star [time, item, branch, location]:
dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count(*)
define dimension time as (time_key, day, day_of_week, month, quarter, year)
define dimension item as (item_key, item_name, brand, type, supplier_type)
define dimension branch as (branch_key, branch_name, branch_type)
define dimension location as (location_key, street, city, province_or_state, country)
Defining a Snowflake Schema in DMQL
define cube sales_snowflake [time, item, branch, location]:
dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count(*)
define dimension time as (time_key, day, day_of_week, month, quarter, year)
define dimension item as (item_key, item_name, brand, type, supplier(supplier_key, supplier_type))
define dimension branch as (branch_key, branch_name, branch_type)
define dimension location as (location_key, street, city(city_key, province_or_state, country))
Defining a Fact Constellation in DMQL
define cube sales [time, item, branch, location]:
dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count(*)
define dimension time as (time_key, day, day_of_week, month, quarter, year)
define dimension item as (item_key, item_name, brand, type, supplier_type)
define dimension branch as (branch_key, branch_name, branch_type)
define dimension location as (location_key, street, city, province_or_state, country)
define cube shipping [time, item, shipper, from_location, to_location]:
dollar_cost = sum(cost_in_dollars), unit_shipped = count(*)
define dimension time as time in cube sales
define dimension item as item in cube sales
define dimension shipper as (shipper_key, shipper_name, location as location in cube sales, shipper_type)
define dimension from_location as location in cube sales
define dimension to_location as location in cube sales
Measures: Three Categories
Measure: a function evaluated on aggregated data corresponding to given dimension-value pairs.
Measures can be:
distributive: if the measure can be calculated in a distributive manner.
E.g., count(), sum(), min(), max().
algebraic: if it can be computed from arguments obtained by applying distributive aggregate functions.
E.g., avg()=sum()/count(), min_N(), standard_deviation().
holistic: if it is not algebraic.
E.g., median(), mode(), rank().
Measures: Three Categories
Distributive and algebraic measures are ideal for data cubes.
Calculated measures at lower levels can be used directly at higher levels.
Holistic measures can be difficult to calculate efficiently.
Holistic measures could often be efficiently approximated.
Browsing a Data Cube
Visualization
OLAP capabilities
Interactive manipulation
A Concept Hierarchy
Concept hierarchies allow data to be handled at varying levels of abstraction
Typical OLAP Operations (Fig 2.10)
Roll up (drill-up): summarize data
by climbing up concept hierarchy or by dimension reduction
Drill down (roll down): reverse of roll-up
from higher level summary to lower level summary or detailed data, or introducing new dimensions
Slice and dice:
project and select
Pivot (rotate):
reorient the cube, visualization, 3D to series of 2D planes.
Other operations
drill across: involving (across) more than one fact table
drill through: through the bottom level of the cube to its back-end relational tables (using SQL)
Querying Using a Star-Net Model

Chapter 2: Data Warehousing and OLAP Technology for Data Mining
What is a data warehouse?
A multi-dimensional data model
Data warehouse architecture
Data warehouse implementation
Further development of data cube technology
From data warehousing to data mining
Data Warehouse Design Process
Top-down, bottom-up approaches or a combination of both
Top-down: Starts with overall design and planning (mature)
Bottom-up: Starts with experiments and prototypes (rapid)
From software engineering point of view
Waterfall: structured and systematic analysis at each step before proceeding to the next
Spiral: rapid generation of increasingly functional systems, quick modifications, timely adaptation of new designs and technologies
Typical data warehouse design process
Choose a business process to model, e.g., orders, invoices, etc.
Choose the grain (atomic level of data) of the business process
Choose the dimensions that will apply to each fact table record
Choose the measure that will populate each fact table record

Three Data Warehouse Models
Enterprise warehouse
collects all of the information about subjects spanning the entire organization
Data Mart
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
Virtual warehouse
A set of views over operational databases
Only some of the possible summary views may be materialized
OLAP Server Architectures
Relational OLAP (ROLAP)
Use relational or extended-relational DBMS to store and manage warehouse data
Include optimization of DBMS backend and additional tools and services
greater scalability
Multidimensional OLAP (MOLAP)
Array-based multidimensional storage engine (sparse matrix techniques)
fast indexing to pre-computed summarized data
Hybrid OLAP (HOLAP)
User flexibility (low level: relational, high-level: array)
Specialized SQL servers
specialized support for SQL queries over star/snowflake schemas
Chapter 2: Data Warehousing and OLAP Technology for Data Mining
What is a data warehouse?
A multi-dimensional data model
Data warehouse architecture
Data warehouse implementation
Further development of data cube technology
From data warehousing to data mining
Efficient Data Cube Computation
Data cube can be viewed as a lattice of cuboids
The bottom-most cuboid is the base cuboid
The top-most cuboid (apex) contains only one cell
How many cuboids in an n-dimensional cube with L levels?

Materialization of data cube
Materialize every (cuboid) (full materialization), none (no materialization), or some (partial materialization)
Selection of which cuboids to materialize
Based on size, sharing, access frequency, etc.
Cube Operation
Cube definition and computation in DMQL
define cube sales[item, city, year]: sum(sales_in_dollars)
compute cube sales
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
Need compute the following Group-Bys
(date, product, customer),
(date,product),(date, customer), (product, customer),
(date), (product), (customer)
()
Cube Computation: ROLAP vs. MOLAP
ROLAP-based cubing algorithms
Key-based addressing
Sorting, hashing, and grouping operations are applied to the dimension attributes to reorder and cluster related tuples
Aggregates may be computed from previously computed aggregates, rather than from the base fact table
MOLAP-based cubing algorithms
Direct array addressing
Partition the array into chunks that fit the memory
Compute aggregates by visiting cube chunks
Possible to exploit ordering of chunks for faster calculation
Multiway Array Aggregation for MOLAP
Partition arrays into chunks (a small subcube which fits in memory).
Compressed sparse array addressing: (chunk_id, offset)
Compute aggregates in “multiway” by visiting cube cells in the order which minimizes the # of times to visit each cell, and reduces memory access and storage cost.
Multiway Array Aggregation for MOLAP
Multiway Array Aggregation for MOLAP
Multiway Array Aggregation for MOLAP
Method: the planes should be sorted and computed according to their size in ascending order.
The proposed scan is optimal if |C|>|B|>|A|
See the details of Example 2.12 (pp. 75-78)
MOLAP cube computation is faster than ROLAP
Limitation of MOLAP: computing well only for a small number of dimensions
If there are a large number of dimensions use the iceberg cube computation: process only “dense” chunks
Indexing OLAP Data: Bitmap Index
Suitable for low cardinality domains
Index on a particular column
Each value in the column has a bit vector: bit-op is fast
The length of the bit vector: # of records in the base table
The i-th bit is set if the i-th row of the base table has the value for the indexed column
Indexing OLAP Data: Join Indices
Join index materializes relational join and speeds up relational join — a rather costly operation
In data warehouses, join index relates the values of the dimensions of a start schema to rows in the fact table.
E.g. fact table: Sales and two dimensions location and item
A join index on location is a list of pairs sorted by location
A join index on location-and-item is a list of triples sorted by location and item names
Search of a join index can still be slow
Bitmapped join index allows speed-up by using bit vectors instead of dimension attribute names
Online Aggregation
Consider an aggregate query:
“finding the average sales by state“
Can we provide the user with some information before the exact average is computed for all states?
Solution: show the current “running average” for each state as the computation proceeds.
Even better, if we use statistical techniques and sample tuples to aggregate instead of simply scanning the aggregated table, we can provide bounds such as “the average for Wisconsin is 2000±102 with 95% probability.
Efficient Processing of OLAP Queries
Determine which operations should be performed on the available cuboids:
transform drill, roll, etc. into corresponding SQL and/or OLAP operations, e.g, dice = selection + projection
Determine to which materialized cuboid(s) the relevant operations should be applied.
Exploring indexing structures and compressed vs. dense array structures in MOLAP (trade-off between indexing and storage performance)
Metadata Repository
Meta data is the data defining warehouse objects. It has the following kinds
Description of the structure of the warehouse
schema, view, dimensions, hierarchies, derived data definitions, data mart locations and contents
Operational meta-data
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)
The algorithms used for summarization
The mapping from operational environment to the data warehouse
Data related to system performance
warehouse schema, view and derived data definitions
Business data
business terms and definitions, ownership of data, charging policies
Data Warehouse Back-End Tools and Utilities
Data extraction:
get data from multiple, heterogeneous, and external sources
Data cleaning:
detect errors in the data and rectify them when possible
Data transformation:
convert data from legacy or host format to warehouse format
Load:
sort, summarize, consolidate, compute views, check integrity, and build indices and partitions
Refresh
propagate the updates from the data sources to the warehouse
Chapter 2: Data Warehousing and OLAP Technology for Data Mining
What is a data warehouse?
A multi-dimensional data model
Data warehouse architecture
Data warehouse implementation
Further development of data cube technology
From data warehousing to data mining
Discovery-Driven Exploration of Data Cubes
Hypothesis-driven: exploration by user, huge search space
Discovery-driven (Sarawagi et al.’98)
pre-compute measures indicating exceptions, guide user in the data analysis, at all levels of aggregation
Exception: significantly different from the value anticipated, based on a statistical model
Visual cues such as background color are used to reflect the degree of exception of each cell
Computation of exception indicator can be overlapped with cube construction

Examples: Discovery-Driven Data Cubes
Chapter 2: Data Warehousing and OLAP Technology for Data Mining
What is a data warehouse?
A multi-dimensional data model
Data warehouse architecture
Data warehouse implementation
Further development of data cube technology
From data warehousing to data mining
Data Warehouse Usage
Three kinds of data warehouse applications
Information processing
supports querying, basic statistical analysis, and reporting using crosstabs, tables, charts and graphs
Analytical processing
multidimensional analysis of data warehouse data
supports basic OLAP operations, slice-dice, drilling, pivoting
Data mining
knowledge discovery from hidden patterns
supports associations, constructing analytical models, performing classification and prediction, and presenting the mining results using visualization tools.
Differences among the three tasks
From On-Line Analytical Processing to On Line Analytical Mining (OLAM)
Why online analytical mining?
High quality of data in data warehouses
DW contains integrated, consistent, cleaned data
Available information processing structure surrounding data warehouses
ODBC, OLEDB, Web accessing, service facilities, reporting and OLAP tools
OLAP-based exploratory data analysis
mining with drilling, dicing, pivoting, etc.
On-line selection of data mining functions
integration and swapping of multiple mining functions, algorithms, and tasks.
Architecture of OLAM
Summary
Data warehouse
A subject-oriented, integrated, time-variant, and nonvolatile collection of data in support of management’s decision-making process
A multi-dimensional model of a data warehouse
Star schema, snowflake schema, fact constellations
A data cube consists of dimensions & measures
OLAP operations: drilling, rolling, slicing, dicing and pivoting
OLAP servers: ROLAP, MOLAP, HOLAP
Efficient computation of data cubes
Partial vs. full vs. no materialization
Multiway array aggregation
Bitmap index and join index implementations
Further development of data cube technology
Discovery-drive and multi-feature cubes
From OLAP to OLAM (on-line analytical mining)

Data Mining and Warehousing 20-`12-2007

Audience: III Year II sem engg. students + MCA II year Student
Jayaprakash narayan College of Engg. Mahboobnagar

Jpnce, 20-12-2007

CS05158: Data Warehousing and Mining


Lecture 1

• Course syllabus
• Overview of data warehousing and mining


Lecture slides modified from:
– Jiawei Han (http://www-sal.cs.uiuc.edu/~hanj/DM_Book.html)
– Vipin Kumar (http://www-users.cs.umn.edu/~kumar/csci5980/index.html)
– Ad Feelders (http://www.cs.uu.nl/docs/vakken/adm/)
– Zdravko Markov (http://www.cs.ccsu.edu/~markov/ccsu_courses/DataMining-1.html)
Rajesh Kulkarni
rrkpv2002@gmail.com
http://rkstechnofusion.blogspot.com
http://children-off-lesser-gods.blogspot.com

Course Syllabus
Textbook:
(required) J. Han, M. Kamber, Data Mining: Concepts and Techniques, 2001.
Data Mining Techniques by Arun K Pujari.
Datawarehousing in the Real World S Anahorey and D Murray
Topics: Unit 1
– Overview of data warehousing and mining
– Data Mining Functionalities
– Classification of Data Mining Systems
– Major Issues in Data Mining
– Data warehouse and OLAP technology for data mining
Motivation:
“Necessity is the Mother of Invention”
• Data explosion problem
– Automated data collection tools and mature database technology lead to tremendous amounts of data stored in databases, data warehouses and other information repositories
• We are drowning in data, but starving for knowledge!
• Solution: Data warehousing and data mining
– Data warehousing and on-line analytical processing
– Extraction of interesting knowledge (rules, regularities, patterns, constraints) from data in large databases
Why Mine Data? Commercial Viewpoint
• Lots of data is being collected
and warehoused
– Web data, e-commerce
– purchases at department/
grocery stores
– Bank/Credit Card
transactions

• Computers have become cheaper and more powerful
• Competitive Pressure is Strong
– Provide better, customized services for an edge (e.g. in Customer Relationship Management)
Why Mine Data? Scientific Viewpoint
• Data collected and stored at
enormous speeds (GB/hour)
– remote sensors on a satellite
– telescopes scanning the skies
– microarrays generating gene
expression data
– scientific simulations
generating terabytes of data
• Traditional techniques infeasible for raw data
• Data mining may help scientists
– in classifying and segmenting data
– in Hypothesis Formation
What Is Data Mining?
• Data mining (knowledge discovery in databases):
– Extraction of interesting (non-trivial, implicit, previously unknown and potentially useful) information or patterns from data in large databases

• Alternative names and their “inside stories”:
– Data mining: a misnomer?
– Knowledge discovery(mining) in databases (KDD), knowledge extraction, data/pattern analysis, data archeology, business intelligence, etc.
Examples: What is (not) Data Mining?
Data Mining: Classification Schemes
• Decisions in data mining
– Kinds of databases to be mined
– Kinds of knowledge to be discovered
– Kinds of techniques utilized
– Kinds of applications adapted
• Data mining tasks
– Descriptive data mining
– Predictive data mining
Decisions in Data Mining
• Databases to be mined
– Relational, transactional, object-oriented, object-relational, active, spatial, time-series, text, multi-media, heterogeneous, legacy, WWW, etc.
• Knowledge to be mined
– Characterization, discrimination, association, classification, clustering, trend, deviation and outlier analysis, etc.
– Multiple/integrated functions and mining at multiple levels
• Techniques utilized
– Database-oriented, data warehouse (OLAP), machine learning, statistics, visualization, neural network, etc.
• Applications adapted
– Retail, telecommunication, banking, fraud analysis, DNA mining, stock market analysis, Web mining, Weblog analysis, etc.
Data Mining Tasks
• Prediction Tasks
– Use some variables to predict unknown or future values of other variables
• Description Tasks
– Find human-interpretable patterns that describe the data.

Common data mining tasks
– Classification [Predictive]
– Clustering [Descriptive]
– Association Rule Discovery [Descriptive]
– Sequential Pattern Discovery [Descriptive]
– Regression [Predictive]
– Deviation Detection [Predictive]

Classification: Definition
• Given a collection of records (training set )
– Each record contains a set of attributes, one of the attributes is the class.
• Find a model for class attribute as a function of the values of other attributes.
• Goal: previously unseen records should be assigned a class as accurately as possible.
– A test set is used to determine the accuracy of the model. Usually, the given data set is divided into training and test sets, with training set used to build the model and test set used to validate it.
Classification Example
Classification: Application 1
• Direct Marketing
– Goal: Reduce cost of mailing by targeting a set of consumers likely to buy a new cell-phone product.
– Approach:
• Use the data for a similar product introduced before.
• We know which customers decided to buy and which decided otherwise. This {buy, don’t buy} decision forms the class attribute.
• Collect various demographic, lifestyle, and company-interaction related information about all such customers.
– Type of business, where they stay, how much they earn, etc.
• Use this information as input attributes to learn a classifier model.

Classification: Application 2
• Fraud Detection
– Goal: Predict fraudulent cases in credit card transactions.
– Approach:
• Use credit card transactions and the information on its account-holder as attributes.
– When does a customer buy, what does he buy, how often he pays on time, etc
• Label past transactions as fraud or fair transactions. This forms the class attribute.
• Learn a model for the class of the transactions.
• Use this model to detect fraud by observing credit card transactions on an account.

Classification: Application 3
• Customer Attrition/Churn:
– Goal: To predict whether a customer is likely to be lost to a competitor.
– Approach:
• Use detailed record of transactions with each of the past and present customers, to find attributes.
– How often the customer calls, where he calls, what time-of-the day he calls most, his financial status, marital status, etc.
• Label the customers as loyal or disloyal.
• Find a model for loyalty.

Classification: Application 4
• Sky Survey Cataloging
– Goal: To predict class (star or galaxy) of sky objects, especially visually faint ones, based on the telescopic survey images (from Palomar Observatory).
– 3000 images with 23,040 x 23,040 pixels per image.
– Approach:
• Segment the image.
• Measure image attributes (features) - 40 of them per object.
• Model the class based on these features.
• Success Story: Could find 16 new high red-shift quasars, some of the farthest objects that are difficult to find!

Classifying Galaxies
Clustering Definition
• Given a set of data points, each having a set of attributes, and a similarity measure among them, find clusters such that
– Data points in one cluster are more similar to one another.
– Data points in separate clusters are less similar to one another.
• Similarity Measures:
– Euclidean Distance if attributes are continuous.
– Other Problem-specific Measures.

Illustrating Clustering
Clustering: Application 1
• Market Segmentation:
– Goal: subdivide a market into distinct subsets of customers where any subset may conceivably be selected as a market target to be reached with a distinct marketing mix.
– Approach:
• Collect different attributes of customers based on their geographical and lifestyle related information.
• Find clusters of similar customers.
• Measure the clustering quality by observing buying patterns of customers in same cluster vs. those from different clusters.

Clustering: Application 2
• Document Clustering:
– Goal: To find groups of documents that are similar to each other based on the important terms appearing in them.
– Approach: To identify frequently occurring terms in each document. Form a similarity measure based on the frequencies of different terms. Use it to cluster.
– Gain: Information Retrieval can utilize the clusters to relate a new document or search term to clustered documents.

Association Rule Discovery: Definition
• Given a set of records each of which contain some number of items from a given collection;
– Produce dependency rules which will predict occurrence of an item based on occurrences of other items.
Association Rule Discovery: Application 1
• Marketing and Sales Promotion:
– Let the rule discovered be
{Bagels, … } --> {Potato Chips}
– Potato Chips as consequent => Can be used to determine what should be done to boost its sales.
– Bagels in the antecedent => Can be used to see which products would be affected if the store discontinues selling bagels.
– Bagels in antecedent and Potato chips in consequent => Can be used to see what products should be sold with Bagels to promote sale of Potato chips!

Association Rule Discovery: Application 2
• Supermarket shelf management.
– Goal: To identify items that are bought together by sufficiently many customers.
– Approach: Process the point-of-sale data collected with barcode scanners to find dependencies among items.
– A classic rule --
• If a customer buys diaper and milk, then he is very likely to buy beer:
The Sad Truth About Diapers and Beer

• So, don’t be surprised if you find six-packs stacked next to diapers!


Sequential Pattern Discovery: Definition
Given is a set of objects, with each object associated with its own timeline of events, find rules that predict strong sequential dependencies among different events:

– In telecommunications alarm logs,
• (Inverter_Problem Excessive_Line_Current)
(Rectifier_Alarm) --> (Fire_Alarm)
– In point-of-sale transaction sequences,
• Computer Bookstore:
(Intro_To_Visual_C) (C++_Primer) --> (Perl_for_dummies,Tcl_Tk)
• Athletic Apparel Store:
(Shoes) (Racket, Racketball) --> (Sports_Jacket)
Regression
• Predict a value of a given continuous valued variable based on the values of other variables, assuming a linear or nonlinear model of dependency.
• Greatly studied in statistics, neural network fields.
• Examples:
– Predicting sales amounts of new product based on advetising expenditure.
– Predicting wind velocities as a function of temperature, humidity, air pressure, etc.
– Time series prediction of stock market indices.

Deviation/Anomaly Detection
• Detect significant deviations from normal behavior
• Applications:
– Credit Card Fraud Detection



– Network Intrusion
Detection

Data Mining and Induction Principle
Induction vs Deduction

• Deductive reasoning is truth-preserving:
– All horses are mammals
– All mammals have lungs
– Therefore, all horses have lungs

• Induction reasoning adds information:
– All horses observed so far have lungs.
– Therefore, all horses have lungs.

The Problems with Induction
From true facts, we may induce false models.

Prototypical example:
– European swans are all white.
– Induce: ”Swans are white” as a general rule.
– Discover Australia and black Swans...
– Problem: the set of examples is not random and representative

Another example: distinguish US tanks from Iraqi tanks
– Method: Database of pictures split in train set and test set; Classification model built on train set
– Result: Good predictive accuracy on test set;Bad score on independent pictures
– Why did it go wrong: other distinguishing features in the pictures (hangar versus desert)
Hypothesis-Based vs. Exploratory-Based
• The hypothesis-based method:
– Formulate a hypothesis of interest.
– Design an experiment that will yield data to test this hypothesis.
– Accept or reject hypothesis depending on the outcome.

• Exploratory-based method:
– Try to make sense of a bunch of data without an a priori hypothesis!
– The only prevention against false results is significance:
• ensure statistical significance (using train and test etc.)
• ensure domain significance (i.e., make sure that the results make sense to a domain expert)
Hypothesis-Based vs. Exploratory-Based
• Experimental Scientist:
– Assign level of fertilizer randomly to plot of land.
– Control for: quality of soil, amount of sunlight,...
– Compare mean yield of fertilized and unfertilized plots.

• Data Miner:
– Notices that the yield is somewhat higher under trees where birds roost.
– Conclusion: droppings increase yield.
– Alternative conclusion: moderate amount of shade increases yield.(“Identification Problem”)
Data Mining: A KDD Process
– Data mining: the core of knowledge discovery process.
Steps of a KDD Process
• Learning the application domain:
– relevant prior knowledge and goals of application
• Creating a target data set: data selection
• Data cleaning and preprocessing: (may take 60% of effort!)
• Data reduction and transformation:
– Find useful features, dimensionality/variable reduction, invariant representation.
• Choosing functions of data mining
– summarization, classification, regression, association, clustering.
• Choosing the mining algorithm(s)
• Data mining: search for patterns of interest
• Pattern evaluation and knowledge presentation
– visualization, transformation, removing redundant patterns, etc.
• Use of discovered knowledge
Data Mining and Business Intelligence
Data Mining: On What Kind of Data?
• Relational databases
• Data warehouses
• Transactional databases
• Advanced DB and information repositories
– Object-oriented and object-relational databases
– Spatial databases
– Time-series data and temporal data
– Text databases and multimedia databases
– Heterogeneous and legacy databases
– WWW
Data Mining: Confluence of Multiple Disciplines
Data Mining vs. Statistical Analysis
Statistical Analysis:
• Ill-suited for Nominal and Structured Data Types
• Completely data driven - incorporation of domain knowledge not possible
• Interpretation of results is difficult and daunting
• Requires expert user guidance

Data Mining:
• Large Data sets
• Efficiency of Algorithms is important
• Scalability of Algorithms is important
• Real World Data
• Lots of Missing Values
• Pre-existing data - not user generated
• Data not static - prone to updates
• Efficient methods for data retrieval available for use
Data Mining vs. DBMS
• Example DBMS Reports
– Last months sales for each service type
– Sales per service grouped by customer sex or age bracket
– List of customers who lapsed their policy

• Questions answered using Data Mining
– What characteristics do customers that lapse their policy have in common and how do they differ from customers who renew their policy?
– Which motor insurance policy holders would be potential customers for my House Content Insurance policy?

Data Mining and Data Warehousing
• Data Warehouse: a centralized data repository which can be queried for business benefit.
• Data Warehousing makes it possible to
– extract archived operational data
– overcome inconsistencies between different legacy data formats
– integrate data throughout an enterprise, regardless of location, format, or communication requirements
– incorporate additional or expert information
• OLAP: On-line Analytical Processing
• Multi-Dimensional Data Model (Data Cube)
• Operations:
– Roll-up
– Drill-down
– Slice and dice
– Rotate
DBMS, OLAP, and Data Mining
Example of DBMS, OLAP and Data Mining: Weather Data
Example of DBMS, OLAP and Data Mining: Weather Data
• By querying a DBMS containing the above table we may answer questions like:
• What was the temperature in the sunny days? {85, 80, 72, 69, 75}
• Which days the humidity was less than 75? {6, 7, 9, 11}
• Which days the temperature was greater than 70? {1, 2, 3, 8, 10, 11, 12, 13, 14}
• Which days the temperature was greater than 70 and the humidity was less than 75? The intersection of the above two: {11}
Example of DBMS, OLAP and Data Mining: Weather Data
OLAP:
• Using OLAP we can create a Multidimensional Model of our data (Data Cube).
• For example using the dimensions: time, outlook and play we can create the following model.
Major Issues in Data Warehousing and Mining
• Mining methodology and user interaction
– Mining different kinds of knowledge in databases
– Interactive mining of knowledge at multiple levels of abstraction
– Incorporation of background knowledge
– Data mining query languages and ad-hoc data mining
– Expression and visualization of data mining results
– Handling noise and incomplete data
– Pattern evaluation: the interestingness problem
• Performance and scalability
– Efficiency and scalability of data mining algorithms
– Parallel, distributed and incremental mining methods

Major Issues in Data Warehousing and Mining
• Issues relating to the diversity of data types
– Handling relational and complex types of data
– Mining information from heterogeneous databases and global information systems (WWW)
• Issues related to applications and social impacts
– Application of discovered knowledge
• Domain-specific data mining tools
• Intelligent query answering
• Process control and decision making
– Integration of the discovered knowledge with existing knowledge: A knowledge fusion problem
– Protection of data security, integrity, and privacy