Predictive Models with SQL Server Machine Learning Services

Slides:



Advertisements
Similar presentations
Data Mining with R/ORE Minming Duan. 2 iTech Solution Profile Agenda R/ORE Overview 1 XML output generation using SQL 4 Integration with IBP and BIEE.
Advertisements

BizTalk Deployment using Visual Studio Release Management
Business Intelligence components Introduction. Microsoft® SQL Server™ 2005 is a complete business intelligence (BI) platform that provides the features,
SQL Server Reporting Services
We will start soon. Feel free to ask (chat window) anything you want before we start.
Machine Learning as a Service
Visual Studio 2012: A Complete IDE (Debugging & Source Control) Kevin Howell.
Exploring R Services and Advanced Analytics
Blog: R YOU READY FOR.
Getting to know U-SQL Azhagappan Arunachalam.  Sr Database Architect 
Blog: R YOU READY FOR.
Intelligent apps Powered by Advanced Analytics.
INTELLIGENT DATA SOLUTIONS COM Intro to Data Factory PASS Cloud Virtual Chapter March 23, 2015 Steve Hughes, Architect.
Blog: R YOU READY FOR.
A Suite of Products that allow you to Predict Outcomes, Prescribe Actions and Automate Decisions.
Introduction to R and Data Science Tools in the Microsoft Stack Jamey Johnston.
9/24/2017 7:27 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Building 1 million predictions per second using SQL-R
Predicting Loan Delinquency at 1M Transactions per Second
Bhakthi Liyanage SQL Saturday Atlanta 15 July 2017
Introduction to R and Data Science Tools in the Microsoft Stack
4/18/2018 3:49 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Data Platform and Analytics Foundational Training
SQL 2016 R Services a.k.a. leveraging your local data lake
R; One Ring to Rule Them All
Visual Studio Database Tools (aka SQL Server Data Tools)
5/16/2018 3:45 AM BRK3298 Building machine learning applications using R and Python in SQL Server 2017 Umachandar Jayachandran (UC) Sumit Kumar Program.
What’s new in SQL Server 2017 for BI?
5/22/2018 1:39 AM BRK2156 Power BI Report Server: Self-service BI and enterprise reporting on-premises Christopher Finlan Senior Program Manager © Microsoft.
Data Virtualization Demoette… ADO.NET Client
Bridging the Data Science and SQL Divide for Practitioners
Spark Presentation.
R in Power BI.
R For The SQL Developer Kevin Feasel Manager, Predictive Analytics
Introduction to R Programming with AzureML
Welcome! Power BI User Group (PUG)
Building Analytics At Scale With USQL and C#
R Programming.
Introducing New Team-based Data Integration with SSIS
Machine Learning Services
Stephen Faig to provide the introduction Mike Ruane, President / CEO
Azure Machine Learning 101
R Integration in Microsoft Solutions
Machine Learning Services
Dane Stubben QuintilesIMS Database Manager
Today’s Beginner Workshop
Brief Intro to Python for Statistics
Visual Studio Database Tools (aka SQL Server Data Tools)
Moving advanced analytics to your SQL Server databases
Populating a Data Warehouse
Microsoft Virtual Academy
EMSE 6574 – Programming for Analytics: Python 101 – Python Enviornments Joel Klein.
Azure Data Lake for First Time Swimmers
DAT381 Team Development with SQL Server 2005
Technical Capabilities
SSDT and Database Project Basics
MDC-B203 Deploying Applications in Microsoft System Center Virtual Machine Manager Using Services John Messec Program Manager Microsoft.
Introduction to VSTS Database Professional
4/15/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Michelle Haarhues Keeping up with SSMS.
Office 365 Development July 2014.
Microsoft Virtual Academy
A DevOps process for deploying R to production
Microsoft Virtual Academy
Beyond orchestration with Azure Data Factory
Preparing for the Windows 8.1 MCSA
SSDT, Docker, and (Azure) DevOps
Microsoft 365 Business Technical Fundamentals Series
Dimension Load Patterns with Azure Data Factory Data Flows
Visual Data Flows – Azure Data Factory v2
Presentation transcript:

Predictive Models with SQL Server Machine Learning Services Bob Rubocki – Practice Manager, BI Architect January 22, 2019

Bob Rubocki Practice Manager & BI Architect, Pragmatic Works brubocki@pragmaticworks.com linkedin.com/in/robertrubocki @BobRubocki bobrubocki.wordpress.com

SQL Server Machine Learning Services Development Experience Agenda R, Python Overview SQL Server Machine Learning Services Development Experience Executing R, Python from SQL Server Demo (R only) Patterns apply to Python Not an R or data science deep-dive Very cool SQL Server integration!

R Overview S – built at Bell Labs R Built for statistical analysis “S” for stats Naming style like “C” R Built by Ross Ihaka and Robert Gentleman at U of Auckland (NZ) Name close to S Built for statistical analysis Managed by Comprehensive R Archive Network (CRAN) cran.r-project.org Open source – continuously new and updated packages

Python Overview General purpose language Managed by Python Software Foundation www.python.org Open source - continuously new and updated packages Machine learning via packages numpy scikit-learn Many others…

SQL Server Machine Learning History SQL Server R Services SQL Server 2017 R and Python SQL Server Machine Learning Services Azure SQL DB (preview) Python? Azure SQL DB Machine Learning Services

Should I use R or Python?

Answer Quartz - If you want to upgrade your data analysis skills, which programming language should you learn? https://qz.com/1063071/the-great-r-versus-python-for-data-science-debate/

Why Use SQL Server Machine Learning Services? Our app data is in SQL Server Integrate advanced analytics into apps Keep data close to R/Python process – reduce latency R version provides parallelism, performance for large data sets R/Python version management

SQL Server Machine Learning Services Not installed by default R/Python run outside SQL Server SQL Server Launchpad to call R/Python

Installation Enable external scripts Restart SQL Server instance for configuration to take effect

Hello World! R Python

R/Python Versions included with ML Services (As of 2019-01-21) R Open (MS), R 3.5.1 RevoScaleR MicrosoftML Python Python 3.5.2, Anaconda 4.2 revoscalepy microsoftml R Open Microsoft’s enhanced R distribution Multithreading Release Stability RevoScale Name from Revolution Analytics Acquired by Microsoft High performance, parallelism MicrosoftML Additional ML functionality Pretrained models for image classification,

Updating R and Python SQL Server Cumulative updates – service packs Bind to Machine Learning Server Run Machine Learning Server Installer R/Python components now registered as Machine Learning Server Components More frequent updates than SQL Server Manual – not recommended

Tools and Developer Experience R Studio Visual Studio Others Python Visual Studio Code

Tools and Developer Experience Data Exploration Feature Engineering Experimenting, model selection R/Python IDE Operations App integration SSMS

Executing R, Python from SQL Server sp_execute_external_script R/Python script as input parameter Executes R/Python external process R/Python code to create and train a model Execute Prediction functions in R/Python using trained model R – rxPredict Python – rx_predict

PREDICT T-SQL Function SQL Server 2017 and later, including Azure SQL DB Runs within SQL Server process, NOT external process Requires trained model binary in native format (perhaps stored in a table) Does NOT require Machine Learning Services (R/Python) to execute

Development and Deployment Pattern Use R Studio for experimentation, determine best model(s) Use SQL Server for… Create Model Stored procedure Create trained model with R Output trained model binary INSERT trained model object to a table Table keeps model versions Retrain periodically Store models with different algorithms Prediction Stored Procedure Trained model as input SQL data set as input Procedure returns predictions 1 2 3

Demo Predict number of ski rentals based on historical data Based on demo from Microsoft https://microsoft.github.io/sql-ml-tutorials/R/rentalprediction/ https://microsoft.github.io/sql-ml-tutorials/python/rentalprediction/ R Studio – use R, build two regression models, choose best SQL Server – use R from step 1, build trained model in SQL, execute predictions

SQL Server Machine Learning Services Development Experience Conclusion R, Python Overview SQL Server Machine Learning Services Development Experience Executing R, Python from SQL Server

brubocki@pragmaticworks.com @bobrubocki linkedin.com/in/robertrubocki/