Data Mining Algorithms

advertisement
Data Management and Exploration
Prof. Dr. Thomas Seidl
Data Mining Algorithms
Lecture Course with Tutorials
Wintersemester 2003/04
RWTH Aachen, Lehrstuhl für Informatik IX
– Data Management and Exploration –
Prof. Dr. Thomas Seidl
Data Management and Exploration
Prof. Dr. Thomas Seidl
Course Organization (1)
„
„
Weekly Schedule
„
Tuesday, 13:45 – 15:15 h, AH VI (Lecture)
„
Thursday, 13:45 – 15:15 h, AH VI (Lecture)
„
Friday, 10:00 – 11:30 h, AH VI (Tutorials) Begins: Oct. 24th
People
„
Prof. Dr. Thomas Seidl
Office hour: Monday, 13:00 – 14:00 h
„
Dipl.-Inform. Ira Assent
„
Dipl.-Inform. Christoph Brochhaus
WS 2003/04
Data Mining Algorithmen
2
Data Management and Exploration
Prof. Dr. Thomas Seidl
Course Organization (2)
„
Credits
„
„
„
Lecture course with tutorials (4 + 2 hrs/wk)
8 ECTS for “Praktische Informatik” or specialization “Datenbanken
und Datenexploration” / “Databases and Data Mining”
„
Selected exercises as homework (50% points for exam admission)
„
Oral or written exam at the end of semester
Material (Slides, Exercises, etc.) available from:
http://www-i9.informatik.rwth-aachen.de/Lehre/
DataMiningAlgorithmen/
WS 2003/04
3
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Content of the Course
„
Introduction
„
Data warehousing and OLAP for data mining
„
Data preprocessing
„
Clustering
„
Classification and prediction techniques
„
Mining association rules in large databases
„
Further topics
WS 2003/04
Data Mining Algorithmen
4
Data Management and Exploration
Prof. Dr. Thomas Seidl
Textbook / Acknowledgements
The slides used in this course are modified versions of the copyrighted
original slides provided by the authors of the adopted textbooks:
© Jiawei Han and Micheline Kamber:
Data Mining – Concepts and Techniques
Morgan Kaufmann Publishers, 2000.
http://www.cs.sfu.ca/~han/dmbook
© Martin Ester and Jörg Sander:
Knowledge Discovery in Databases –
Techniken und Anwendungen
Springer Verlag, 2000 (in German).
WS 2003/04
5
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Source and History of the Slides
„
„
„
„
Prof. Dr. Jiawei Han started working on this set of slides for an UCLA
Extension course in February 1998.
Dr. Hongjun Lu from Hong Kong Univ. of Science and Technology taught
jointly with Jiawei Han a Data Mining Summer Course in Shanghai, China in
July 1998. He has contributed many slides to it.
Some graduate students have contributed many new slides in the following
years. Notable contributors include Eugene Belchev, Jian Pei, and Osmar R.
Zaiane (now teaching in Univ. of Alberta).
Prof. Dr. Jörg Sander, Univ. of Alberta in Edmonton, Canada provided some
more slides, particularly on clustering algorithms. They are an extension of
slides used for a Data Mining course at Univ. of Munich jointly taught with
Prof. Dr. Martin Ester (now teaching in Simon-Fraser-Univ. in Vancouver).
WS 2003/04
Data Mining Algorithmen
6
Data Management and Exploration
Prof. Dr. Thomas Seidl
Chapter 1. Introduction
„
Motivation: Why data mining?
„
What is data mining?
„
Data Mining: On what kind of data?
„
Data mining functionality
„
Are all the patterns interesting?
„
Classification of data mining systems
„
Major issues in data mining
WS 2003/04
7
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
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 (OLAP)
„
Extraction of interesting knowledge (rules, regularities,
patterns, constraints) from data in large databases
WS 2003/04
Data Mining Algorithmen
8
Data Management and Exploration
Prof. Dr. Thomas Seidl
Evolution of Database Technology
„
1960s:
„
„
1970s:
„
„
Relational data model, relational DBMS implementation
1980s:
„
„
Data collection, database creation, IMS and network DBMS
RDBMS, advanced data models (extended-relational, OO,
deductive, etc.) and application-oriented DBMS (spatial, scientific,
engineering, etc.)
1990s—2000s:
„
Data mining and data warehousing, multimedia databases, and
Web databases
WS 2003/04
9
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
What Is Data Mining?
„
Data mining (knowledge discovery in databases):
„
„
Alternative names and their “inside stories”:
„
„
„
Data mining: a misnomer?
Knowledge discovery(mining) in databases (KDD),
knowledge extraction, data/pattern analysis, data
archeology, data dredging (“Ausbaggern”), information
harvesting, business intelligence, etc.
What is not data mining?
„
„
WS 2003/04
Extraction of interesting (non-trivial, implicit, previously
unknown and potentially useful) information or patterns
from data in large databases
(Deductive) query processing.
Expert systems or small ML/statistical programs
Data Mining Algorithmen
10
Why Data Mining?
— Potential Applications
Data Management and Exploration
Prof. Dr. Thomas Seidl
„
Database analysis and decision support
„
Market analysis and management
„
„
Risk analysis and management
„
„
„
target marketing, customer relation management, market
basket analysis, cross selling, market segmentation
Forecasting, customer retention (Eigenbeteiligung), improved
underwriting, quality control, competitive analysis
Fraud detection and management
Other Applications
„
Text mining (news group, email, documents) and Web analysis.
„
Intelligent query answering
WS 2003/04
11
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Market Analysis and Management (1)
„
Where are the data sources for analysis?
„
„
Target marketing
„
„
Find clusters of “model” customers who share the same
characteristics: interest, income level, spending habits, etc.
Determine customer purchasing patterns over time
„
„
Credit card transactions, loyalty cards, discount coupons,
customer complaint calls, plus (public) lifestyle studies
Conversion of a single to a joint bank account: marriage, etc.
Cross-market analysis
WS 2003/04
„
Associations/co-relations between product sales
„
Prediction based on the association information
Data Mining Algorithmen
12
Data Management and Exploration
Prof. Dr. Thomas Seidl
Market Analysis and Management (2)
„
Customer profiling
„
data mining can tell you what types of customers buy what
products (clustering or classification)
„
„
Identifying customer requirements
„
identifying the best products for different customers
„
use prediction to find what factors will attract new customers
Provide summary information
„
various multidimensional summary reports
„
statistical summary information (data central tendency and
variation of the data)
WS 2003/04
13
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Corporate Analysis and
Risk Management
„
Finance planning and asset evaluation
„
„
„
„
Resource planning:
„
„
cash flow analysis and prediction
contingent claim analysis to evaluate assets
cross-sectional and time series analysis (financial-ratio, trend
analysis, etc.)
summarize and compare the resources and spending
Competition:
„
„
„
WS 2003/04
monitor competitors and market directions
group customers into classes and a class-based pricing
procedure
set pricing strategy in a highly competitive market
Data Mining Algorithmen
14
Data Management and Exploration
Prof. Dr. Thomas Seidl
Fraud Detection and Management
„
Applications
„
„
Approach
„
„
widely used in health care, retail, credit card services,
telecommunications (phone card fraud), etc.
use historical data to build models of fraudulent behavior and
use data mining to help identify similar instances
Examples
„
„
„
auto insurance: detect a group of people who stage accidents to
collect on insurance
money laundering: detect suspicious money transactions (e.g.,
US Treasury's Financial Crimes Enforcement Network)
medical insurance: detect professional patients and ring of
doctors and ring of references
WS 2003/04
15
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Data Mining and Business Intelligence
Increasing potential
to support
business decisions
Making
Decisions
Data Presentation
Visualization Techniques
Data Mining
Information Discovery
End User
Business
Analyst
Data
Analyst
Data Exploration
Statistical Analysis, Querying and Reporting
Data Warehouses / Data Marts
OLAP, MDA
Data Sources
Paper, Files, Information Providers, Database Systems, OLTP
WS 2003/04
Data Mining Algorithmen
DBA
16
Data Management and Exploration
Prof. Dr. Thomas Seidl
Architecture of Typical Data Mining
Systems
Graphical user interface
Pattern evaluation
Data mining engine
Database or data
warehouse server
Data cleaning & data integration
Databases
WS 2003/04
Knowledge-base
Filtering
Data
Warehouse
17
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Data Mining: On What Kind of Data?
„
„
„
„
Relational databases
Data warehouses
Transactional databases
Advanced DB and information repositories
„
„
„
„
„
„
WS 2003/04
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 Algorithmen
18
Data Management and Exploration
Prof. Dr. Thomas Seidl
The KDD Process
Selections
Projections
Transformations
Data
Mining
Task-relevant
Data
Visualization
Evaluation
Patterns
Knowledge
“Data Warehouse”
Data Cleaning
Data Integration
Data Mining:
• a central step in the process
• application of algorithms that find
“patterns” in the data.
Databases/
Information Repositories
WS 2003/04
19
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Steps of a KDD Process
„
Learning the application domain:
„
„
„
„
Creating a target data set: data selection
Data cleaning and preprocessing: (may take 60% of effort!)
Data reduction and transformation:
„
„
„
„
summarization, classification, regression, association, clustering.
Choosing the mining algorithm(s)
Data mining: search for patterns of interest
Pattern evaluation and knowledge presentation
„
„
Find useful features, dimensionality/variable reduction, invariant
representation.
Choosing functions of data mining
„
„
relevant prior knowledge and goals of application
visualization, transformation, removing redundant patterns, etc.
Use of discovered knowledge
WS 2003/04
Data Mining Algorithmen
20
Data Management and Exploration
Prof. Dr. Thomas Seidl
Data Cleaning and Integration
„
Integration of data from different sources
„
„
„
„
„
Mapping of attribute names
Data Cleaning
(e.g. C_Nr → O_Id)
Data Integration “Data Warehouse”
Joining different tables
(e.g. Table1 = [C_Nr, Info1]
Databases/
Information Repositories
and Table2 = [O_Id, Info2] ⇒
JoinedTable = [O_Id, Info1, Info2])
Elimination of inconsistencies
Elimination of noise
Computation of Missing Values (if necessary and possible)
„
Fill in missing values by some strategy (e.g. default value,
average value, or application specific computations)
WS 2003/04
21
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Focusing on task-relevant data
„
Selections
„
Select the relevant tuples/rows
from the database tables
Selections
Projections
Transformations
(e.g., sales data for the year 2001)
„
Projections
„
„
Task-relevant
Data
“Data Warehouse”
Select the relevant attributes/columns from the database tables
(e.g., “id”, “date” “amount” from (Id, name, date, location, amount))
Transformations, e.g.:
„
Normalization (e.g., age:[18, 87] Æ n_age:[0, 100]
„
Discretisation of numerical attributes
„
Computation of derived tuples/rows and derived attributes
(e.g., amount:[0, 100] Æ d_amount:{low, medium, high}
„
„
WS 2003/04
aggregation of sets of tuples, e.g., total amount per months
new attributes, e.g., diff = sales current month – sales previous month)
Data Mining Algorithmen
22
Data Management and Exploration
Prof. Dr. Thomas Seidl
Basic Data Mining Tasks
Data
„
„
„
„
„
Mining
Clustering
Task-relevant
Patterns
Data
Classification
Association Rules
Concept Characterization and Discrimination
Other methods
„
„
„
„
„
Outlier detection
Sequential patterns
Trends and analysis of changes
Methods for special data types, e.g., spatial data
mining, web mining
…
WS 2003/04
23
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Clustering
„
Class labels are unknown:
Group objects into sub-groups (clusters)
„
„
„
Similarity function (or dissimilarity fct. = distance)
to measure similarity between objects
Objective: “maximize” intra-class similarity and
“minimize” interclass similarity
Applications
„
Customer profiling/segmentation
Document or image collections
Web access patterns
...
WS 2003/04
Data Mining Algorithmen
„
„
„
24
Data Management and Exploration
Prof. Dr. Thomas Seidl
Classification
Class labels are known for a small set of “training data”:
Find models/functions/rules (based on attribute values of
the training examples) that
„
„
„
describe and distinguish classes
predict class membership for “new” objects
Applications
„
„
„
„
„
a
a
a
aa
ba
a
b
b b ab
b
a
b b b
Classify gene expression values for tissue samples to predict
disease type and suggest best possible treatment
Automatic assignment of categories to large sets of newly
observed celestial objects
Predict unknown or missing values (Æ KDD pre-processing step)
...
WS 2003/04
25
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Association Rules
Find frequent associations in transaction databases
„
Frequently co-occurring items in the set of transactions
(frequent itemsets): indicate correlations or causalities
„ Rules with a minimum confidence
Transaction ID Items Bought
based on frequent itemsets
„
„
Applications:
„
„
„
„
2000
A,B,C
1000
A,C
Market-basket analysis
4000
Cross-marketing
5000
Catalog design
Also used as a basis for clustering, classification
A,D
B,E,F
Examples:
buys(x, “diapers”) → buys(x, “beers”) [support: 0.5%, confidence: 60%]
major(x, “CS”) ^ takes(x, “DB”) → grade(x, “A”) [support: 1%, confidence: 75%]
WS 2003/04
Data Mining Algorithmen
26
Data Management and Exploration
Prof. Dr. Thomas Seidl
Generalization,
Characterization, Discrimination
„
Generalize, summarize, and contrast data characteristics
„
Based on attribute aggregation along concept hierarchies
„ Data cube approach (OLAP)
„ Attribute-oriented induction approach
all
all
Europe
region
country
city
Germany
Frankfurt
office
WS 2003/04
...
North_America
...
Spain
Canada
Vancouver
...
L. Chan
...
...
...
Mexico
Toronto
M. Wind
27
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Other Methods
„
Outlier detection
„
„
Trends and Evolution Analysis
„
„
„
Sequential patterns (find re-occurring sequences of events)
Regression analysis
Methods for special data types, and applications e.g.,
„
„
„
„
„
„
Find objects that do not comply with the general behavior of the
data (fraud detection, rare events analysis)
Spatial data mining
Web mining
Bio-KDD
Graphs
...
…
WS 2003/04
Data Mining Algorithmen
28
Data Management and Exploration
Prof. Dr. Thomas Seidl
Evaluation and Visualization
„
Integration of visualization and data mining
„
„
„
„
„
data visualization
data mining result visualization
data mining process visualization
interactive visual data mining
Visualization
Evaluation
Patterns
Knowledge
Different types of 2D/3D plots, charts and diagrams are
used, e.g.:
„
„
„
„
„
WS 2003/04
Box-plots
Trees
X-Y-Plots
Parallel coordinates
...
29
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Are All the “Discovered”
Patterns Interesting?
„
A data mining system/query may generate thousands of patterns,
not all of them are interesting.
„
„
Interestingness measures:
„
„
Suggested approach: Human-centered, query-based, focused mining
A pattern is interesting if it is easily understood by humans, valid on
new or test data with some degree of certainty, potentially useful,
novel, or validates some hypothesis that a user seeks to confirm
Objective vs. subjective interestingness measures:
„
„
WS 2003/04
Objective: based on statistics and structures of patterns, e.g., support,
confidence, etc.
Subjective: based on user’s belief in the data, e.g., unexpectedness,
novelty, actionability, etc.
Data Mining Algorithmen
30
Data Management and Exploration
Prof. Dr. Thomas Seidl
Can We Find All and Only
Interesting Patterns?
„
„
Find all the interesting patterns: Completeness
„
Can a data mining system find all the interesting patterns?
„
Association vs. classification vs. clustering
Search for only interesting patterns: Optimization
„
Can a data mining system find only the interesting patterns?
„
Approaches
„
„
First generate all the patterns and then filter out the
uninteresting ones.
Generate only the interesting patterns—mining query
optimization
WS 2003/04
31
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Data Mining:
Confluence of Multiple Disciplines
Database
Technology
Machine
Learning
Statistics
Data Mining
Information
Science
WS 2003/04
Visualization
Other
Disciplines
Data Mining Algorithmen
32
Data Management and Exploration
Prof. Dr. Thomas Seidl
Data Mining: Classification Schemes
„
„
WS 2003/04
General functionality
„
Descriptive data mining
„
Predictive data mining
Different views, different classifications
„
Kinds of databases to be mined
„
Kinds of knowledge to be discovered
„
Kinds of techniques utilized
„
Kinds of applications adapted
33
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
A Multi-Dimensional View
of Data Mining Classification
„
„
„
„
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
„
WS 2003/04
Retail, telecommunication, banking, fraud analysis, DNA mining, stock
market analysis, Web mining, Weblog analysis, etc.
Data Mining Algorithmen
34
Data Management and Exploration
Prof. Dr. Thomas Seidl
OLAP Mining: An Integration of Data
Mining and Data Warehousing
„
Data mining systems, DBMS, Data warehouse systems
coupling
„
„
On-line analytical mining data
„
„
integration of mining and OLAP technologies
Interactive mining multi-level knowledge
„
„
No coupling, loose-coupling, semi-tight-coupling, tight-coupling
Necessity of mining knowledge and patterns at different levels of
abstraction by drilling/rolling, pivoting, slicing/dicing, etc.
Integration of multiple mining functions
„
WS 2003/04
Characterized classification, first clustering and then association
35
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Major Issues in Data Mining (1)
„
„
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
WS 2003/04
Data Mining Algorithmen
36
Data Management and Exploration
Prof. Dr. Thomas Seidl
Major Issues in Data Mining (2)
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
WS 2003/04
37
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Summary
„
„
„
„
„
Data mining: discovering interesting patterns from large amounts of
data
A natural evolution of database technology, in great demand, with
wide applications
A KDD process includes data cleaning, data integration, data
selection, transformation, data mining, pattern evaluation, and
knowledge presentation
Mining can be performed in a variety of information repositories
Data mining functionalities: characterization, discrimination,
association, classification, clustering, outlier and trend analysis, etc.
„
Classification of data mining systems
„
Major issues in data mining
WS 2003/04
Data Mining Algorithmen
38
A Brief History of
Data Mining Society
„
1989 IJCAI (Int‘l Joint Conf. on Artificial Intelligence) Workshop on Knowledge
Discovery in Databases (Piatetsky-Shapiro)
„
„
„
Advances in Knowledge Discovery and Data Mining (U. Fayyad, G. PiatetskyShapiro, P. Smyth, and R. Uthurusamy, 1996)
1995-1998 International Conferences on Knowledge Discovery in
Databases and Data Mining (KDD’95-98)
„
„
Knowledge Discovery in Databases (G. Piatetsky-Shapiro and W. Frawley, 1991)
1991-1994 Workshops on Knowledge Discovery in Databases
„
„
Data Management and Exploration
Prof. Dr. Thomas Seidl
Journal of Data Mining and Knowledge Discovery (1997)
1998 ACM SIGKDD, SIGKDD’1999-2001 conferences, and SIGKDD
Explorations
More conferences on data mining
„
PAKDD, PKDD, SIAM-Data Mining, (IEEE) ICDM, etc.
WS 2003/04
39
Data Mining Algorithmen
Data Management and Exploration
Prof. Dr. Thomas Seidl
Where to Find References?
„
Data mining and KDD (SIGKDD member CDROM):
„
„
„
Database field (SIGMOD member CD ROM):
„
„
„
„
Conference proceedings: Machine learning, AAAI, IJCAI, etc.
Journals: Machine Learning, Artificial Intelligence, etc.
Statistics:
„
„
„
Conference proceedings: ACM-SIGMOD, ACM-PODS, VLDB, ICDE, EDBT,
DASFAA
Journals: ACM-TODS, J. ACM, IEEE-TKDE, JIIS, etc.
AI and Machine Learning:
„
„
Conference proceedings: KDD, and others, such as PKDD, PAKDD, etc.
Journal: Data Mining and Knowledge Discovery
Conference proceedings: Joint Stat. Meeting, etc.
Journals: Annals of statistics, etc.
Visualization:
„
„
WS 2003/04
Conference proceedings: CHI (Comp. Human Interaction), etc.
Journals: IEEE Trans. visualization and computer graphics, etc.
Data Mining Algorithmen
40
Data Management and Exploration
Prof. Dr. Thomas Seidl
References
„
„
„
„
„
„
„
„
U. M. Fayyad, G. Piatetsky-Shapiro, P. Smyth, and R. Uthurusamy. Advances
in Knowledge Discovery and Data Mining . AAAI/MIT Press, 1996.
J. Han and M. Kamber. Data Mining: Concepts and Techniques. Morgan
Kaufmann, 2000.
T. Imielinski and H. Mannila. A database perspective on knowledge discovery.
Communications of the ACM, 39:58-64, 1996.
G. Piatetsky-Shapiro, U. Fayyad, and P. Smith. From data mining to
knowledge discovery: An overview. In U.M. Fayyad, et al. (eds.), Advances in
Knowledge Discovery and Data Mining, 1-35. AAAI/MIT Press, 1996.
G. Piatetsky-Shapiro and W. J. Frawley. Knowledge Discovery in Databases.
AAAI/MIT Press, 1991.
M. Ester and J. Sander. Knowledge Discovery in Databases: Techniken und
Anwendungen. Springer Verlag, 2000 (in German).
M. H. Dunham. Data Mining: Introductory and Advanced Topics. Prentice Hall,
2003.
D. Hand, H. Mannila, P. Smyth. Principles of Data Mining. MIT Press, 2001.
WS 2003/04
Data Mining Algorithmen
41
Download