SQL Server 2008 Data Mining


Published on

SQL Server 2008 Data Mining

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • SQL Server 2008 Data Mining

    1. 1. SSAS 2008 Data Mining Lynn Langit/MSDN Developer Evangelist Microsoft http://blogs.msdn.com/SoCalDevGal
    2. 2. Session Prerequisites <ul><li>Working SQL Server 2008 Developer </li></ul><ul><li>Understanding of OLAP concepts </li></ul><ul><li>Working SQL Server Analysis Server 2005 Developer </li></ul><ul><li>Interest in or basic knowledge of Data Mining concepts </li></ul>
    3. 3. Objectives and Agenda <ul><ul><li>Understand what, why, when & how of SQL Server 2008 Data Mining </li></ul></ul><ul><ul><li>Examine the core functionality of the Data Mining Extensions </li></ul></ul><ul><ul><li>Hear about the new and/or advanced functionality of Data Mining </li></ul></ul>
    4. 4. What and Why Data Mining? Predictive Analytics Presentation Exploration Discovery Passive Interactive Proactive Role of Software Business Insight Canned reporting Ad-hoc reporting OLAP Data mining
    5. 5. Cubes vs. Data Mining
    6. 6. DM - Scenarios to Tasks
    7. 7. Tasks to Techniques
    8. 8. BI for Everyone Individual – Excel Project – Share Point
    9. 9. Microsoft’s Predictive Analytics Data Mining SQL extensions (DMX) Application Developer Data Mining Specialist Microsoft Dynamics CRM Analytics Foundation SQL Server 2008 Business Intelligence Development Studio Microsoft SQL Server 2008 Analysis Services Information Worker Data Mining Add-ins for the 2007 Microsoft Office system Microsoft SQL Server 2008 Data Mining BI Analyst Custom Algorithms SQL Services Azure
    10. 10. Data Mining Add-ins for Office 2007 Table Analysis Tools for Excel 2007 Data Mining Template for Visio 2007 Data Mining Client for Excel 2007 Information Worker BI Analyst Data Mining Specialist
    11. 11. Microsoft Data Mining Lifecycle CRISP-DM SSAS (Data Mining) Excel SSAS (DSV) Query Excel SSIS SSAS SSRS Excel Your Apps SSIS SSAS Excel Data www.crisp-dm.org Business Understanding Data Understanding Data Preparation Modeling Evaluation Deployment
    12. 12. Understand & Prepare specifics
    13. 13. Demo 1 – Explore / Clean / Partition Data 2 – Prepare Data
    14. 14. Modeling Specifics
    15. 15. Demo <ul><li>3 – Select algorithm </li></ul><ul><li>4 – Create model </li></ul>
    16. 16. Evaluation Specifics
    17. 17. Demo <ul><li>5 – Evaluate Model </li></ul><ul><li>6 – Deploy model </li></ul><ul><li>7- Update model </li></ul><ul><li>8 – Query model </li></ul>
    18. 18. Data Mining – Logical Model algorithm Mining Model Mining Model Training Data DB data Client data Application data Data Mining Engine To Predict Predicted Data Mining Model DB data Client data Application data “ Just one row ” Data Mining Engine
    19. 19. Data Mining - Physical Model Analysis Services Server Mining Model Data Mining Algorithm Data Source Your Application OLE DB/ ADOMD/ XMLA Deploy BI Dev Studio (Visual Studio) App Data
    20. 20. Data Mining Interfaces – APIs XMLA Over TCP/IP XMLA Over HTTP Analysis Server (msmdsrv.exe) OLAP Data Mining Server ADOMD.NET .Net Stored Procedures Microsoft Algorithms Third Party Algorithms OLEDB for OLAP/DM ADO/DSO Any Platform, Any Device C++ App VB App .Net App AMO Any App ADOMD.NET WAN DM Interfaces
    21. 21. Configuration & Deployment <ul><li>Model Creation/Management </li></ul><ul><ul><li>Database Administrators </li></ul></ul><ul><ul><li>Session Mining Models </li></ul></ul><ul><li>Model Application </li></ul><ul><ul><li>Permissions on models </li></ul></ul><ul><ul><li>Permissions on data sources </li></ul></ul><ul><li>Browse </li></ul><ul><ul><li>Copy to Excel </li></ul></ul><ul><ul><li>Drillthrough </li></ul></ul><ul><li>Query </li></ul><ul><ul><li>Default </li></ul></ul><ul><ul><li>Advanced </li></ul></ul><ul><li>Excel Services </li></ul><ul><li>Manage models and structures </li></ul><ul><ul><li>Export/Import </li></ul></ul><ul><ul><li>Rename </li></ul></ul><ul><li>Connection </li></ul><ul><ul><li>Database </li></ul></ul><ul><ul><li>Trace </li></ul></ul>
    22. 22. Data Mining Extensions (DMX) CREATE MINING MODEL CreditRisk (CustID LONG KEY, Gender TEXT DISCRETE, Income LONG CONTINUOUS, Profession TEXT DISCRETE, Risk TEXT DISCRETE PREDICT) USING Microsoft_Decision_Trees INSERT INTO CreditRisk (CustId, Gender, Income, Profession, Risk) Select CustomerID, Gender, Income, Profession,Risk From Customers Select NewCustomers.CustomerID, CreditRisk.Risk, PredictProbability(CreditRisk.Risk) FROM CreditRisk PREDICTION JOIN NewCustomers ON CreditRisk.Gender=NewCustomer.Gender AND CreditRisk.Income=NewCustomer.Income AND CreditRisk.Profession=NewCustomer.Profession
    23. 23. DMX Column Expressions <ul><li>Predictable Columns </li></ul><ul><li>Source Data Columns </li></ul><ul><li>Functions - Predict </li></ul><ul><ul><ul><li>“ Workhorse” </li></ul></ul></ul><ul><ul><ul><li>Discrete scalar values </li></ul></ul></ul><ul><ul><ul><li>Continuous scalar values </li></ul></ul></ul><ul><ul><ul><li>Associative nested tables </li></ul></ul></ul><ul><ul><ul><li>Sequence nested tables </li></ul></ul></ul><ul><ul><ul><li>Time Series </li></ul></ul></ul><ul><ul><ul><li>Overloaded to </li></ul></ul></ul><ul><ul><ul><ul><li>PredictAssociation </li></ul></ul></ul></ul><ul><ul><ul><ul><li>PredictSequence </li></ul></ul></ul></ul><ul><ul><ul><ul><li>PredictTimeSeries </li></ul></ul></ul></ul><ul><ul><li>PredictProbability </li></ul></ul><ul><ul><li>PredictSupport </li></ul></ul><ul><ul><li>PredictHistogram </li></ul></ul><ul><ul><li>Cluster </li></ul></ul><ul><ul><li>ClusterProbability </li></ul></ul><ul><ul><li>GetNodeId </li></ul></ul><ul><ul><li>IsInNode </li></ul></ul><ul><li>Arithmetic operators </li></ul><ul><li>Stored Procedure </li></ul><ul><li>Subselect </li></ul><ul><ul><li>Select from nested tables </li></ul></ul>
    24. 24. Demo – Data Mining & Excel 20007 integration
    25. 25. Excel Functions* <ul><ul><li>DMPREDICTTABLEROW ( Connection, ModelName, PredictionResult, TableRowRange [, string CommaSeparatedColumnNames] ) </li></ul></ul><ul><ul><li>DMPREDICT ( Connection, Model, PredictionResult, Value1, Name1, [...,Value32, Name32] ) </li></ul></ul><ul><ul><li>DMCONTENTQUERY (Connection, Model, PredictionResult [, WhereClause]) </li></ul></ul>
    26. 26. DM in the Cloud <ul><li>Test Data Types </li></ul><ul><ul><li>Relational </li></ul></ul><ul><ul><li>CSV </li></ul></ul><ul><ul><li>SQL Services (Azure Services) </li></ul></ul>
    27. 27. Try it in the cloud…
    28. 28. Analysis Results in the Cloud…
    29. 29. Calling the Cloud…(from Excel 2007)
    30. 30. New to SQL Server 2008 DM <ul><li>Microsoft Time Series algorithm improved </li></ul><ul><ul><li>ARIMA plus ARTxp method, and a blending algorithm = better results </li></ul></ul><ul><ul><li>New prediction mode allows adding new data to time series models </li></ul></ul><ul><li>Holdout Support added </li></ul><ul><ul><li>Easily partition data into training and test sets that are stored in mining structure & available to query after processing </li></ul></ul><ul><li>Ability to build mining models based on filtered subsets added </li></ul><ul><ul><li>Results in less structures, i.e. can just filter existing </li></ul></ul><ul><li>Drillthrough functionality extended </li></ul><ul><ul><li>makes all mining structure columns available, not just columns included in the model </li></ul></ul><ul><ul><li>allows you to build more compact models </li></ul></ul><ul><li>Cross-validation added </li></ul><ul><ul><li>allows users to quickly validate their modeling approach by automatically building temporary models and evaluating accuracy measures across K folds. The feature is available through a new cross-validation tab under Accuracy Charts in BIDS, in addition to being accessible programmatically via a stored procedure call. </li></ul></ul>
    31. 31. Summary <ul><li>Data Mining in SQL Server 2008 is mature, powerful and accessible </li></ul><ul><li>Can use Excel 2007 </li></ul><ul><ul><li>Familiar client for BI – OLAP cubes AND Data Mining models </li></ul></ul><ul><ul><ul><li>Model Creators / Users </li></ul></ul></ul><ul><ul><ul><li>Excel Data or Server Data </li></ul></ul></ul><ul><li>SSAS and Excel both support the full DM Cycle </li></ul><ul><ul><li>Data Understanding & Data Preparation </li></ul></ul><ul><ul><li>Modeling, Validation & Deployment </li></ul></ul><ul><li>SQL Services Incubations available now </li></ul><ul><ul><li>Data Mining from the Cloud </li></ul></ul><ul><ul><li>More </li></ul></ul>
    32. 32. DM Webcasts Fri, 02 Nov 2007 MSDN Webcast: Build Smart Web Applications with SQL Server Data Mining (Level 200) Thu, 08 Nov 2007 MSDN Webcast: Building Adaptive Applications with SQL Server Data Mining (Level 300) Mon, 19 Nov 2007 MSDN Webcast: Extending and Customizing SQL Server Data Mining (Level 300) Fri, 30 Nov 2007 MSDN Webcast: Creating Visualizations for SQL Server Data Mining (Level 300) Thu, 01 Nov 2007 TechNet Webcast: Deliver Actionable Insight Throughout Your Organization with Data Mining (Part 1 of 3): Your First Project with SQL Server Data Mining (Level 200) Thu, 15 Nov 2007 TechNet Webcast: Deliver Actionable Insight Throughout Your Organization with Data Mining (Part 2 of 3): Understand SQL Server Data Mining Add-ins for the 2007 Office System (Level 200) Thu, 29 Nov 2007 TechNet Webcast: Deliver Actionable Insight Throughout Your Organization with Data Mining (Part 3 of 3): Use Predictive Intelligence to Create Smarter KPIs (Level 200)
    33. 33. DM Resources Technical Communities, Webcasts, Blogs, Chats & User Groups http://www.microsoft.com/communities/default.mspx Microsoft Developer Network (MSDN) & TechNet http://microsoft.com/msdn http://microsoft.com/technet Trial Software and Virtual Labs http://www.microsoft.com/technet/downloads/trials/default.mspx Microsoft Learning and Certification http://www.microsoft.com/learning/default.mspx SQL Server Data Mining http://www.sqlserverdatamining.com http://www.microsoft.com/bi/bicapabilities/data-mining.aspx
    34. 34. BI Resources from Lynn Langit http :// blogs.msdn.com/SoCalDevGal “ How Do I…BI?” screencast series on MSDN “ Smart Business Intelligence Solutions with Microsoft SQL Server 2008” MSPress Feb 2009 “ Foundations of SQL Server 2005 Business Intelligence ” APress April 2007