KEMBAR78
Introduction to Data Mining | PDF
An Introduction to SQL Server 2005
       and 2008 Data Mining
                           Peter Myers
          Mentor – Solid Quality Mentors
 San Francisco SQL Server User Group – 8 July, 2009



        Copyright © 2009, Solid Quality Mentors. All rights reserved.
WHO WE ARE

• Industry experts:
  Growing, elite group of over 90 of the world’s best technical experts who, as
  reflected by the high concentration of Microsoft MVP’s and RD’s in our ranks,
  achieve excellence in their industry by maintaining the highest credentials.
• Published authors:
  Best technical reference books, Microsoft reference materials, industry white
  papers, technical magazine articles, and webcasts.
• Top technical speakers:
  PASS Community Summit, Microsoft TechEd, The Microsoft BI Conference,
  SQL Server DevConnections, countless user groups, international
  conferences and events.
• For more information visit www.solidq.com


                   Copyright © 2009, Solid Quality Mentors. All rights reserved.
WHAT WE DO

Provide advanced, world-class expertise across the entire
Microsoft relational data and development platforms and
              complimenting technologies.

 PRACTICE AREAS                                     SERVICES
 Relational Database Management                     Advanced, Public Training
 Business Intelligence                              Customized, Private Training
 Development Methodologies                          Solution Delivery & Tuning
 SharePoint Collaboration                           Enhanced, Mentoring Services



      For more information visit www.solidq.com
                  Copyright © 2009, Solid Quality Mentors. All rights reserved.
AGENDA

• Introducing Data Mining
• Describing the Data Mining Process
• SQL Server™ 2008 Data Mining
• Data Preparation
• Data Mining Visualization
• Demonstrations


             Copyright © 2009, Solid Quality Mentors. All rights reserved.
INTRODUCING
                                                                   DATA MINING
• Addresses the problem:
 “Too much data and not enough information”
• Enables data exploration, pattern discovery, and pattern
 prediction—which lead to knowledge discovery
• Forms a key part of a BI solution




              Copyright © 2009, Solid Quality Mentors. All rights reserved.
BUSINESS
                                                                         SCENARIOS
• Identifying responsive customers/unresponsive
 customers (also known as churn analysis)
• Targeting promotions
• Detecting and preventing fraud
• Correcting data during ETL
• Forecasting sales and inventory
• Cross-selling

             Copyright © 2009, Solid Quality Mentors. All rights reserved.
DESCRIBING THE
                                    DATA MINING PROCESS
                                                                       “Doing Data
                                                                         Mining”
  Business                                       Data
Understanding                                Understanding




                                                              Data
                                                           Preparation

                             Data
 Deployment

                                                             Modeling


                           Evaluation
 “Putting Data
Mining to Work”                                               www.crisp-dm.org

       Copyright © 2009, Solid Quality Mentors. All rights reserved.
DATA
                                                                        PREPARATION
• Often significant amounts of effort are required to prepare data
  for mining:
   • Transforming for cleaning and reformatting
   • Isolating and flagging abnormal data
   • Appropriately substituting missing values
   • Discretizing continuous values into ranges
   • Normalizing values between 0 and 1
• Of course, having the required data to begin with is important:
   • When designing systems, give consideration to attributes that may be
     required as inputs for classification
      o For example, demographic data: Age, Gender, Region, etc


                   Copyright © 2009, Solid Quality Mentors. All rights reserved.
MODELING


Design time
Process time
Query time                                                                     Mining Model




               Copyright © 2009, Solid Quality Mentors. All rights reserved.
MODELING


Design time
Process time
Query time                                                                     Mining Model




                                                    Data
                                                   Mining
                                                   Engine
                Training Data



               Copyright © 2009, Solid Quality Mentors. All rights reserved.
MODELING


Design time
Process time
Query time                                                                     Mining Model




                                                    Data
                                                   Mining
                                                   Engine


               Predicted Data                                                  Data to Predict

               Copyright © 2009, Solid Quality Mentors. All rights reserved.
MODEL
                                                                             VALIDATION
• It is important that the model makes sense
  •   Accuracy
      o Does it correlate and predict correctly?
  •   Reliability
      o Does it work similarly for different test data?
  •   Usefulness
      o Does it provide insight or only obvious trivialities?
• Commonly a holdout set of data is used to test model
 accuracy


                    Copyright © 2009, Solid Quality Mentors. All rights reserved.
SQL SERVER™ 2008
                                                              DATA MINING
• Hides the complexity of an advanced technology
• Includes full suite of algorithms to automatically extract
 information from data
• Handles large volumes of data and complex data
• Data can be sourced from relational and OLAP databases
• Uses standard programming interfaces:
   • XMLA
   • DMX
• Delivers a complete framework for building and deploying
  intelligent applications

                Copyright © 2009, Solid Quality Mentors. All rights reserved.
SQL SERVER™ 2008
                                               ALGORITHMS

     • Microsoft Naïve Bayes
         •    Quick and approachable algorithm
         •    Used for classification


     • Microsoft Decision Trees
         •    Popular data mining technique
         •    Used for classification, regression and association


     • Microsoft Linear Regression
         •    Finds the best possible straight line through a series of
              points
         •    Used for prediction analysis


Copyright © 2009, Solid Quality Mentors. All rights reserved.
SQL SERVER™ 2008
                                               ALGORITHMS

     • Microsoft Neural Network
         •    More sophisticated than Decision Trees and Naïve
              Bayes, this algorithm can explore extremely complex
              scenarios
         •    Used for classification and regression tasks


     • Microsoft Logistic Regression
         •    A particular case of the Neural Network algorithm


     • Microsoft Clustering
         •    Finds natural groupings inside data
         •    Supports segmentation and anomaly detection tasks


Copyright © 2009, Solid Quality Mentors. All rights reserved.
SQL SERVER™ 2008
                                               ALGORITHMS

     • Microsoft Sequence Clustering
         •    Groups a sequence of discrete events into natural
              groups based on similarity


     • Microsoft Time Series
         •    Used to predict future values from a time series
         •    Has been improved in SQL Server 2008 to produce
              more accurate long-term forecasts


     • Microsoft Association Rules
         •    Commonly supports market basket analysis to learn
              what products are purchased together


Copyright © 2009, Solid Quality Mentors. All rights reserved.
SQL SERVER™ 2008
                                                               ALGORITHMS


  Classify       Estimate                 Cluster                Forecast         Associate

• Decision     • Decision             • Clustering            • Time Series     • Association
  Trees          Trees                                                            Rules
• Logistic     • Linear                                                         • Decision
  Regression     Regression                                                       Trees
• Naïve        • Logistic
  Bayes          Regression
• Neural       • Neural
  Networks       Networks




                Copyright © 2009, Solid Quality Mentors. All rights reserved.
DATA MINING
                                                                  VISUALIZATION
• In contrast to OLTP and OLAP queries, data mining queries
 typically extract information that the user is not aware of
• Appreciate that end users do not typically query data mining
 models directly
• Visualizations can effectively present data discoveries
• SQL Server™ 2008 provides algorithm-specific visualizations that
  can:
   • Test and explore models in BIDS
   • Be embedded into Web and Windows Forms applications
• Developers can construct and plug-in custom data mining
  viewers
                Copyright © 2009, Solid Quality Mentors. All rights reserved.
DEMONSTRATIONS
1.   Introducing the Table Analysis Tools for Excel 2007
2.   Creating, Training, Testing and Querying Mining Models with BIDS
3.   Developing a Data Mining Report
4.   Enhancing an E-Commerce Site with Market Basket Analysis




                    Copyright © 2009, Solid Quality Mentors. All rights reserved.
                                2008,
RESOURCES

• www.microsoft.com/sql/technologies/dm
  •   Links to technical resources, case studies, news, and reviews
• www.sqlserverdatamining.com
  •   Site designed and maintained by the SQL Server Data Mining
      team
  •   Includes: Live samples, tutorials, webcasts, tips and tricks, and
      FAQ
• Data Mining for SQL Server 2008, by ZhaoHui Tang and
 Jamie MacLennan

                 Copyright © 2009, Solid Quality Mentors. All rights reserved.

Introduction to Data Mining

  • 1.
    An Introduction toSQL Server 2005 and 2008 Data Mining Peter Myers Mentor – Solid Quality Mentors San Francisco SQL Server User Group – 8 July, 2009 Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 2.
    WHO WE ARE •Industry experts: Growing, elite group of over 90 of the world’s best technical experts who, as reflected by the high concentration of Microsoft MVP’s and RD’s in our ranks, achieve excellence in their industry by maintaining the highest credentials. • Published authors: Best technical reference books, Microsoft reference materials, industry white papers, technical magazine articles, and webcasts. • Top technical speakers: PASS Community Summit, Microsoft TechEd, The Microsoft BI Conference, SQL Server DevConnections, countless user groups, international conferences and events. • For more information visit www.solidq.com Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 3.
    WHAT WE DO Provideadvanced, world-class expertise across the entire Microsoft relational data and development platforms and complimenting technologies. PRACTICE AREAS SERVICES Relational Database Management Advanced, Public Training Business Intelligence Customized, Private Training Development Methodologies Solution Delivery & Tuning SharePoint Collaboration Enhanced, Mentoring Services For more information visit www.solidq.com Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 4.
    AGENDA • Introducing DataMining • Describing the Data Mining Process • SQL Server™ 2008 Data Mining • Data Preparation • Data Mining Visualization • Demonstrations Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 5.
    INTRODUCING DATA MINING • Addresses the problem: “Too much data and not enough information” • Enables data exploration, pattern discovery, and pattern prediction—which lead to knowledge discovery • Forms a key part of a BI solution Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 6.
    BUSINESS SCENARIOS • Identifying responsive customers/unresponsive customers (also known as churn analysis) • Targeting promotions • Detecting and preventing fraud • Correcting data during ETL • Forecasting sales and inventory • Cross-selling Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 7.
    DESCRIBING THE DATA MINING PROCESS “Doing Data Mining” Business Data Understanding Understanding Data Preparation Data Deployment Modeling Evaluation “Putting Data Mining to Work” www.crisp-dm.org Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 8.
    DATA PREPARATION • Often significant amounts of effort are required to prepare data for mining: • Transforming for cleaning and reformatting • Isolating and flagging abnormal data • Appropriately substituting missing values • Discretizing continuous values into ranges • Normalizing values between 0 and 1 • Of course, having the required data to begin with is important: • When designing systems, give consideration to attributes that may be required as inputs for classification o For example, demographic data: Age, Gender, Region, etc Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 9.
    MODELING Design time Process time Querytime Mining Model Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 10.
    MODELING Design time Process time Querytime Mining Model Data Mining Engine Training Data Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 11.
    MODELING Design time Process time Querytime Mining Model Data Mining Engine Predicted Data Data to Predict Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 12.
    MODEL VALIDATION • It is important that the model makes sense • Accuracy o Does it correlate and predict correctly? • Reliability o Does it work similarly for different test data? • Usefulness o Does it provide insight or only obvious trivialities? • Commonly a holdout set of data is used to test model accuracy Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 13.
    SQL SERVER™ 2008 DATA MINING • Hides the complexity of an advanced technology • Includes full suite of algorithms to automatically extract information from data • Handles large volumes of data and complex data • Data can be sourced from relational and OLAP databases • Uses standard programming interfaces: • XMLA • DMX • Delivers a complete framework for building and deploying intelligent applications Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 14.
    SQL SERVER™ 2008 ALGORITHMS • Microsoft Naïve Bayes • Quick and approachable algorithm • Used for classification • Microsoft Decision Trees • Popular data mining technique • Used for classification, regression and association • Microsoft Linear Regression • Finds the best possible straight line through a series of points • Used for prediction analysis Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 15.
    SQL SERVER™ 2008 ALGORITHMS • Microsoft Neural Network • More sophisticated than Decision Trees and Naïve Bayes, this algorithm can explore extremely complex scenarios • Used for classification and regression tasks • Microsoft Logistic Regression • A particular case of the Neural Network algorithm • Microsoft Clustering • Finds natural groupings inside data • Supports segmentation and anomaly detection tasks Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 16.
    SQL SERVER™ 2008 ALGORITHMS • Microsoft Sequence Clustering • Groups a sequence of discrete events into natural groups based on similarity • Microsoft Time Series • Used to predict future values from a time series • Has been improved in SQL Server 2008 to produce more accurate long-term forecasts • Microsoft Association Rules • Commonly supports market basket analysis to learn what products are purchased together Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 17.
    SQL SERVER™ 2008 ALGORITHMS Classify Estimate Cluster Forecast Associate • Decision • Decision • Clustering • Time Series • Association Trees Trees Rules • Logistic • Linear • Decision Regression Regression Trees • Naïve • Logistic Bayes Regression • Neural • Neural Networks Networks Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 18.
    DATA MINING VISUALIZATION • In contrast to OLTP and OLAP queries, data mining queries typically extract information that the user is not aware of • Appreciate that end users do not typically query data mining models directly • Visualizations can effectively present data discoveries • SQL Server™ 2008 provides algorithm-specific visualizations that can: • Test and explore models in BIDS • Be embedded into Web and Windows Forms applications • Developers can construct and plug-in custom data mining viewers Copyright © 2009, Solid Quality Mentors. All rights reserved.
  • 19.
    DEMONSTRATIONS 1. Introducing the Table Analysis Tools for Excel 2007 2. Creating, Training, Testing and Querying Mining Models with BIDS 3. Developing a Data Mining Report 4. Enhancing an E-Commerce Site with Market Basket Analysis Copyright © 2009, Solid Quality Mentors. All rights reserved. 2008,
  • 20.
    RESOURCES • www.microsoft.com/sql/technologies/dm • Links to technical resources, case studies, news, and reviews • www.sqlserverdatamining.com • Site designed and maintained by the SQL Server Data Mining team • Includes: Live samples, tutorials, webcasts, tips and tricks, and FAQ • Data Mining for SQL Server 2008, by ZhaoHui Tang and Jamie MacLennan Copyright © 2009, Solid Quality Mentors. All rights reserved.