Data Mining
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
    Data Mining Task Primitives
    Integration of data mining system with a DB and DW System
    Major issues in data mining
                                                                 2
 Why Data Mining?
   The Explosive Growth of Data
 Data collection and data availability
         Automated data collection tools, database systems, Web,
           computerized society
       Major sources of abundant data
         Business: Web, e-commerce, transactions, stocks, 
         Science: Remote sensing, bioinformatics, scientific
           simulation, 
         Society and everyone: news, digital cameras,
   We are drowning in data, but starving for knowledge!
   Necessity is the mother of inventionData miningAutomated
    analysis of massive data sets                               3
    Evolution of Database Technology
   1960s:
       Data collection, database creation, IMS and network DBMS
   1970s:
       Relational data model, relational DBMS implementation
   1980s:
       RDBMS, advanced data models (extended-relational, OO, deductive,
        etc.)
       Application-oriented DBMS (spatial, scientific, engineering, etc.)
   1990s:
       Data mining, data warehousing, multimedia databases, and Web
        databases
   2000s
       Stream data management and mining
       Data mining and its applications
       Web technology (XML, data integration) and global information
        systems
                                                                             4
    What Is Data Mining?
   Data mining (knowledge discovery from data)
       Extraction of interesting (non-trivial, implicit, previously
        unknown and potentially useful) patterns or knowledge from
        huge amount of data
       Data mining: a misnomer?
   Alternative names
       Knowledge discovery (mining) in databases (KDD),
        knowledge extraction, data/pattern analysis, data
        archeology, data dredging, information harvesting, business
        intelligence, etc.
   Watch out: Is everything data mining?
       Simple search and query processing
       (Deductive) expert systems
                                                                      5
Why Data Mining?Potential Applications
   Data analysis and decision support
       Market analysis and management
         Target marketing, customer relationship management
          (CRM), market basket analysis, cross selling, market
          segmentation
       Risk analysis and management
         Forecasting, customer retention, improved underwriting,
          quality control, competitive analysis
       Fraud detection and detection of unusual patterns (outliers)
   Other Applications
       Text mining (news group, email, documents) and Web mining
       Stream data mining
       Bioinformatics and bio-data analysis
                                                                       6
Ex. 1: Market Analysis and Management
    Where does the data come from?Credit card transactions, loyalty cards,
     discount coupons, customer complaint calls, plus (public) lifestyle studies
    Target marketing
        Find clusters of model customers who share the same
         characteristics: interest, income level, spending habits, etc.,
        Determine customer purchasing patterns over time
    Cross-market analysisFind associations/co-relations between product
     sales, & predict based on such association
    Customer profilingWhat types of customers buy what products (clustering
     or classification)
    Customer requirement analysis
        Identify the best products for different customers
        Predict what factors will attract new customers
    Provision of summary information
        Multidimensional summary reports
        Statistical summary information (data central tendency and variation)
                                                                               7
Ex. 2: Corporate Analysis & Risk Management
    Finance planning and asset evaluation
        cash flow analysis and prediction
        contingent claim analysis to evaluate assets
        cross-sectional and time series analysis (financial-ratio, trend
         analysis, etc.)
    Resource planning
        summarize and compare the resources and spending
    Competition
        monitor competitors and market directions
        group customers into classes and a class-based pricing procedure
        set pricing strategy in a highly competitive market
                                                                            8
Ex. 3: Fraud Detection & Mining Unusual
Patterns
    Approaches: Clustering & model construction for frauds, outlier analysis
    Applications: Health care, retail, credit card service, telecomm.
        Auto insurance: ring of collisions
        Money laundering: suspicious monetary transactions
        Medical insurance
            Professional patients, ring of doctors, and ring of references
            Unnecessary or correlated screening tests
        Telecommunications: phone-call fraud
            Phone call model: destination of the call, duration, time of day or
             week. Analyze patterns that deviate from an expected norm
        Retail industry
            Analysts estimate that 38% of retail shrink is due to dishonest
             employees
        Anti-terrorism
                                                                                9
Knowledge Discovery (KDD) Process
     Data miningcore                     Pattern Evaluation
      of knowledge
      discovery process
                                    Data Mining
                     Task-relevant Data
       Data Warehouse         Selection
 Data Cleaning
           Data Integration
                                                                10
         Databases
    KDD Process: Several Key Steps
   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.
                                                                   11
   Use of discovered knowledge
Data Mining and Business Intelligence
 Increasing potential
 to support
 business decisions                                                       End User
                                    Decision
                                    Making
                              Data Presentation                           Business
                                                                           Analyst
                             Visualization Techniques
                                 Data Mining                                    Data
                                Information Discovery                         Analyst
                                 Data Exploration
                  Statistical Summary, Querying, and Reporting
            Data Preprocessing/Integration, Data Warehouses
                                                                                DBA
                               Data Sources
      Paper, Files, Web documents, Scientific experiments, Database Systems      12
Data Mining: Confluence of Multiple
Disciplines
             Database
            Technology                Statistics
 Machine                                            Visualization
 Learning                Data Mining
   Pattern
 Recognition                                         Other
                          Algorithm                Disciplines
                                                                 13
Why Not Traditional Data Analysis?
   Tremendous amount of data
       Algorithms must be highly scalable to handle such as tera-bytes
        of data
   High-dimensionality of data
       Micro-array may have tens of thousands of dimensions
   High complexity of data
       Data streams and sensor data
       Time-series data, temporal data, sequence data
       Structure data, graphs, social networks and multi-linked data
       Heterogeneous databases and legacy databases
       Spatial, spatiotemporal, multimedia, text and Web data
       Software programs, scientific simulations
   New and sophisticated applications
                                                                   14
Multi-Dimensional View of Data
Mining
   Data to be mined
       Relational, data warehouse, transactional, stream, object-
        oriented/relational, active, spatial, time-series, text, multi-media,
        heterogeneous, legacy, WWW
   Knowledge to be mined
       Characterization, discrimination, association, classification, clustering,
        trend/deviation, outlier analysis, etc.
       Multiple/integrated functions and mining at multiple levels
   Techniques utilized
       Database-oriented, data warehouse (OLAP), machine learning,
        statistics, visualization, etc.
   Applications adapted
       Retail, telecommunication, banking, fraud analysis, bio-data mining,
        stock market analysis, text mining, Web mining, etc.
                                                                                15
Data Mining: Classification Schemes
   General functionality
      Descriptive data mining
      Predictive data mining
   Different views lead to different classifications
      Data view: Kinds of data to be mined
      Knowledge view: Kinds of knowledge to be
         discovered
      Method view: Kinds of techniques utilized
      Application view: Kinds of applications adapted
                                                         16
Data Mining: On What Kinds of
Data?
   Database-oriented data sets and applications
       Relational database, data warehouse, transactional database
   Advanced data sets and advanced applications
       Data streams and sensor data
       Time-series data, temporal data, sequence data (incl. bio-sequences)
       Structure data, graphs, social networks and multi-linked data
       Object-relational databases
       Heterogeneous databases and legacy databases
       Spatial data and spatiotemporal data
       Multimedia database
       Text databases
       The World-Wide Web
                                                                         17
Data Mining Functionalities
   Multidimensional concept description: Characterization and
    discrimination
       Generalize, summarize, and contrast data characteristics, e.g.,
        dry vs. wet regions
   Frequent patterns, association, correlation vs. causality
       Diaper  Beer [0.5%, 75%] (Correlation or causality?)
   Classification and prediction
       Construct models (functions) that describe and distinguish
        classes or concepts for future prediction
         E.g., classify countries based on (climate), or classify cars
          based on (gas mileage)
       Predict some unknown or missing numerical values
                                                                     18
    Data Mining Functionalities (2)
   Cluster analysis
     Class label is unknown: Group data to form new classes, e.g.,
        cluster houses to find distribution patterns
     Maximizing intra-class similarity & minimizing interclass
        similarity
   Outlier analysis
     Outlier: Data object that does not comply with the general
        behavior of the data
     Noise or exception? Useful in fraud detection, rare events
        analysis
   Trend and evolution analysis
     Trend and deviation: e.g., regression analysis
     Periodicity analysis
     Similarity-based analysis
   Other pattern-directed or statistical analyses
                                                                 19
Are All the Discovered Patterns
Interesting?
   Data mining may generate thousands of patterns: Not all of them are
    interesting
       Suggested approach: Human-centered, query-based, focused mining
   Interestingness measures
       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
       Objective: based on statistics and structures of patterns, e.g.,
        support, confidence, etc.
       Subjective: based on users belief in the data, e.g., unexpectedness,
        novelty, actionability, etc.
                                                                              20
Find All and Only Interesting Patterns?
   Find all the interesting patterns: Completeness
       Can a data mining system find all the interesting patterns? Do
        we need to find all of the interesting patterns?
       Heuristic vs. exhaustive search
       Association vs. classification vs. clustering
   Search for only interesting patterns: An optimization problem
       Can a data mining system find only the interesting patterns?
       Approaches
         First general all the patterns and then filter out the
          uninteresting ones
         Generate only the interesting patternsmining query
          optimization
                                                                    21
Why Data Mining Query Language?
    Automated vs. query-driven?
        Finding all the patterns autonomously in a database?unrealistic
         because the patterns could be too many but uninteresting
    Data mining should be an interactive process
        User directs what to be mined
    Users must be provided with a set of primitives to be used to communicate
     with the data mining system
    Incorporating these primitives in a data mining query language
        More flexible user interaction
        Foundation for design of graphical user interface
        Standardization of data mining industry and practice
                                                                            22
DMQLA Data Mining Query Language
   Motivation
       A DMQL can provide the ability to support ad-hoc and
        interactive data mining
       By providing a standardized language like SQL
         Hope to achieve a similar effect like that SQL has on
          relational database
         Foundation for system development and evolution
         Facilitate information exchange, technology
          transfer, commercialization and wide acceptance
                                                                  23
An Example Query in DMQL
                           24
Integration of Data Mining and Data
Warehousing
    Data mining systems, DBMS, Data warehouse systems coupling
        No coupling, loose-coupling, semi-tight-coupling, tight-coupling
    On-line analytical mining data
        integration of mining and OLAP technologies
    Interactive mining multi-level knowledge
        Necessity of mining knowledge and patterns at different levels of
         abstraction by drilling/rolling, pivoting, slicing/dicing, etc.
    Integration of multiple mining functions
        Characterized classification, first clustering and then association
                                                                               25
Coupling Data Mining with DB/DW Systems
   No couplingflat file processing, not recommended
   Loose coupling
       Fetching data from DB/DW
   Semi-tight couplingenhanced DM performance
       Provide efficient implement a few data mining primitives in a
        DB/DW system, e.g., sorting, indexing, aggregation,
        histogram analysis, multiway join, precomputation of some
        stat functions
   Tight couplingA uniform information processing environment
       DM is smoothly integrated into a DB/DW system, mining
        query is optimized based on mining query, indexing, query
        processing methods, etc.
                                                                    26
Architecture: Typical Data Mining System
            Graphical User Interface
                 Pattern Evaluation
                                                      Knowl
             Data Mining Engine                       edge-
                                                      Base
                 Database or Data
                 Warehouse Server
         data cleaning, integration, and selection
                    Data    World-Wide Other Info
      Database                         Repositories
                  Warehouse    Web
                                                              27
    Major Issues in Data Mining
   Mining methodology
       Mining different kinds of knowledge from diverse data types, e.g., bio,
        stream, Web
       Performance: efficiency, effectiveness, and scalability
       Pattern evaluation: the interestingness problem
       Incorporation of background knowledge
       Handling noise and incomplete data
       Parallel, distributed and incremental mining methods
       Integration of the discovered knowledge with existing one: knowledge
        fusion
   User interaction
       Data mining query languages and ad-hoc mining
       Expression and visualization of data mining results
       Interactive mining of knowledge at multiple levels of abstraction
   Applications and social impacts
     Domain-specific data mining & invisible data mining
     Protection of data security, integrity, and privacy                   28
What Is Association Rule Mining?
  Frequent patterns: patterns (set of items,
   sequence, etc.) that occur frequently in a
   database [AIS93]
  Frequent pattern mining: finding
   regularities in data
    What products were often purchased together?
      Beer and diapers?!
    What are the subsequent purchases after buying
     a car?
    Can we automatically profile customers?
                                                 29
Basics
 Itemset: a set of
  items                   Transaction database TDB
   E.g., acm={a, c, m}
 Support of itemsets     TID     Items bought
   Sup(acm)=3            100   f, a, c, d, g, I, m, p
 Given min_sup=3,       200    a, b, c, f, l,m, o
  acm is a frequent      300    b, f, h, j, o
  pattern                400    b, c, k, s, p
 Frequent pattern       500    a, f, c, e, l, p, m, n
  mining: find all
  frequent patterns in a
  database
                                                     30
Frequent Pattern Mining Methods
 Apriori and its variations/improvements
 Mining frequent-patterns without
  candidate generation
 Mining max-patterns and closed
  itemsets
 Mining multi-dimensional, multi-level
  frequent patterns with flexible support
  constraints
 Interestingness: correlation and
  causality
                                            31
Apriori: Candidate Generation-and-test
  Any subset of a frequent itemset must be
   also frequent  an anti-monotone property
    A transaction containing {beer, diaper, nuts}
     also contains {beer, diaper}
    {beer, diaper, nuts} is frequent  {beer,
     diaper} must also be frequent
  No superset of any infrequent itemset
   should be generated or tested
    Many item combinations can be pruned
                                                     32
Apriori-based Mining
 Generate length (k+1) candidate
  itemsets from length k frequent
  itemsets, and
 Test the candidates against DB
                                    33
  Apriori Algorithm
   A level-wise, candidate-generation-and-test approach
    (Agrawal & Srikant 1994)
 Data base D                   1-candidates         Freq 1-itemsets            2-candidates
 TID     Items                 Itemset    Sup            Itemset    Sup            Itemset
 10      a, c, d                  a        2                a        2                ab
 20      b, c, e      Scan D      b        3                b        3                ac
 30      a, b, c, e               c        3                c        3                ae
 40      b, e                     d        1               e         3                bc
                                  e        3                                          be
 Min_sup=2                                                                            ce
        3-candidates                Freq 2-itemsets                  Counting
Scan D            Itemset                Itemset   Sup             Itemset   Sup
                    bce                     ac      2                 ab      1
                                            bc      2                 ac      2         Scan D
                                            be      3                 ae      1
           Freq 3-itemsets                  ce      2                 bc      2
              Itemset   Sup                                           be      3
                bce      2                                            ce      2
                                                                                         34
The Apriori Algorithm
 Ck: Candidate itemset of size k
 Lk : frequent itemset of size k
 L1 = {frequent items};
 for (k = 1; Lk !=; k++) do
   Ck+1 = candidates generated from Lk;
   for each transaction t in database do increment
    the count of all candidates in Ck+1 that are
    contained in t
   Lk+1 = candidates in Ck+1 with min_support
 return k Lk;
                                                  35
Important Details of Apriori
 How to generate candidates?
   Step 1: self-joining Lk
   Step 2: pruning
 How to count supports of candidates?
                                     36
How to Generate Candidates?
 Suppose the items in Lk-1 are listed in an
  order
 Step 1: self-join Lk-1
  INSERT INTO Ck
  SELECT p.item1, p.item2, , p.itemk-1, q.itemk-1
  FROM Lk-1 p, Lk-1 q
  WHERE p.item1=q.item1, , p.itemk-2=q.itemk-2,
     p.itemk-1 < q.itemk-1
 Step 2: pruning
   For each itemset c in Ck do
     For each (k-1)-subsets s of c do if (s is not in
       Lk-1) then delete c from Ck
                                                         37
Example of Candidate-generation
 L3={abc, abd, acd, ace, bcd}
 Self-joining: L3*L3
   abcd from abc and abd
   acde from acd and ace
 Pruning:
   acde is removed because ade is not in L3
 C4={abcd}
                                           38
How to Count Supports of Candidates?
 Why counting supports of candidates a
  problem?
   The total number of candidates can be very
    huge
   One transaction may contain many candidates
 Method:
   Candidate itemsets are stored in a hash-tree
   Leaf node of hash-tree contains a list of itemsets
    and counts
   Interior node contains a hash table
   Subset function: finds all the candidates
    contained in a transaction
                                                    39
Challenges of Frequent Pattern Mining
 Challenges
   Multiple scans of transaction database
   Huge number of candidates
   Tedious workload of support counting for
    candidates
 Improving Apriori: general ideas
   Reduce number of transaction database scans
   Shrink number of candidates
   Facilitate support counting of candidates
                                                  40
    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.
   Data mining systems and architectures
   Major issues in data mining
                                                                       41
     A Brief History of Data Mining Society
   1989 IJCAI Workshop on Knowledge Discovery in Databases
       Knowledge Discovery in Databases (G. Piatetsky-Shapiro and W.
        Frawley, 1991)
   1991-1994 Workshops on Knowledge Discovery in Databases
       Advances in Knowledge Discovery and Data Mining (U. Fayyad, G.
        Piatetsky-Shapiro, P. Smyth, and R. Uthurusamy, 1996)
   1995-1998 International Conferences on Knowledge Discovery in Databases
    and Data Mining (KDD95-98)
       Journal of Data Mining and Knowledge Discovery (1997)
   ACM SIGKDD conferences since 1998 and SIGKDD Explorations
   More conferences on data mining
       PAKDD (1997), PKDD (1997), SIAM-Data Mining (2001), (IEEE) ICDM
        (2001), etc.
   ACM Transactions on KDD starting in 2007
                                                                         42
Conferences and Journals on Data Mining
   KDD Conferences                       Other related conferences
     ACM SIGKDD Int. Conf. on                ACM SIGMOD
       Knowledge Discovery in                 VLDB
       Databases and Data Mining              (IEEE) ICDE
       (KDD)
                                              WWW, SIGIR
     SIAM Data Mining Conf. (SDM)
     (IEEE) Int. Conf. on Data Mining        ICML, CVPR, NIPS
       (ICDM)                             Journals
     Conf. on Principles and                 Data Mining and Knowledge
       practices of Knowledge                  Discovery (DAMI or DMKD)
       Discovery and Data Mining              IEEE Trans. On Knowledge and
       (PKDD)
                                               Data Eng. (TKDE)
     Pacific-Asia Conf. on Knowledge
       Discovery and Data Mining              KDD Explorations
       (PAKDD)                                ACM Trans. on KDD
                                                                       43
Where to Find References? DBLP, CiteSeer,
Google
   Data mining and KDD (SIGKDD: CDROM)
        Conferences: ACM-SIGKDD, IEEE-ICDM, SIAM-DM, PKDD, PAKDD, etc.
        Journal: Data Mining and Knowledge Discovery, KDD Explorations, ACM TKDD
   Database systems (SIGMOD: ACM SIGMOD AnthologyCD ROM)
        Conferences: ACM-SIGMOD, ACM-PODS, VLDB, IEEE-ICDE, EDBT, ICDT,
         DASFAA
        Journals: IEEE-TKDE, ACM-TODS/TOIS, JIIS, J. ACM, VLDB J., Info. Sys., etc.
   AI & Machine Learning
        Conferences: Machine learning (ML), AAAI, IJCAI, COLT (Learning Theory),
         CVPR, NIPS, etc.
        Journals: Machine Learning, Artificial Intelligence, Knowledge and Information
         Systems, IEEE-PAMI, etc.
   Web and IR
        Conferences: SIGIR, WWW, CIKM, etc.
        Journals: WWW: Internet and Web Information Systems,
   Statistics
        Conferences: Joint Stat. Meeting, etc.
        Journals: Annals of statistics, etc.
   Visualization
        Conference proceedings: CHI, ACM-SIGGraph, etc.
        Journals: IEEE Trans. visualization and computer graphics, etc.              44
    Recommended Reference Books
   S. Chakrabarti. Mining the Web: Statistical Analysis of Hypertex and Semi-Structured Data. Morgan
    Kaufmann, 2002
   R. O. Duda, P. E. Hart, and D. G. Stork, Pattern Classification, 2ed., Wiley-Interscience, 2000
   T. Dasu and T. Johnson. Exploratory Data Mining and Data Cleaning. John Wiley & Sons, 2003
   U. M. Fayyad, G. Piatetsky-Shapiro, P. Smyth, and R. Uthurusamy. Advances in Knowledge Discovery
    and Data Mining. AAAI/MIT Press, 1996
   U. Fayyad, G. Grinstein, and A. Wierse, Information Visualization in Data Mining and Knowledge
    Discovery, Morgan Kaufmann, 2001
   J. Han and M. Kamber. Data Mining: Concepts and Techniques. Morgan Kaufmann, 2nd ed.,
    2006
   D. J. Hand, H. Mannila, and P. Smyth, Principles of Data Mining, MIT Press, 2001
   T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning: Data Mining,
    Inference, and Prediction, Springer-Verlag, 2001
   T. M. Mitchell, Machine Learning, McGraw Hill, 1997
   G. Piatetsky-Shapiro and W. J. Frawley. Knowledge Discovery in Databases. AAAI/MIT Press, 1991
   P.-N. Tan, M. Steinbach and V. Kumar, Introduction to Data Mining, Wiley, 2005
   S. M. Weiss and N. Indurkhya, Predictive Data Mining, Morgan Kaufmann, 1998
   I. H. Witten and E. Frank, Data Mining: Practical Machine Learning Tools and Techniques
                                                                                        45
    with Java Implementations, Morgan Kaufmann, 2nd ed. 2005