SlideShare a Scribd company logo
Predictive Analysis using
Microsoft SQL Server R Services
Advanced Analytics
Introduction
Speaker
• Fisnik Doko
Microsoft Certified Trainer
• 21 active certificates - Microsoft
• MCSD: App Builder | Web applications
• MCSE: Data Management and Analytics | Data Platform
• MCSE: Cloud Platform and Infrastructure
• Software Architect
• Consultant
• Speaker
Content
• Advanced Analytics Introduction
• What is R?
• What is Microsoft R?
• Microsoft SQL Server R Services
• R for machine learning
• Demo
• R and Python
Diagnostic
[Interactive Dashboards]
Prescriptive
[Recommendations & Automation]
Predictive
[Machine Learning]
Descriptive
[Reports]
What should
I do?
What will
happen?
Why did it
happen?
What
happened? Insight
From data to decisions and actions
Retail & Consumer Products
Healthcare
Financial Services & Insurance
Government
Manufacturing
€
Industries applying advanced analytics
Typical Predictive Analytics Process
• Prepare: Assemble,
cleanse, profile and
transform diverse data
relevant to the subject
OperationalizeModelPrepare
SQL Query Data Science R in Database
What is
• A statistics programming language
• A data visualization tool
• Open source
• 2.5+M users
• Taught in most universities
• Thriving user groups worldwide
• 15 000+ free algorithms in CRAN
• Machine Learning includes 400+ R packages
• Scalable to big data
• New and recent grad’s use it
Language
Platform
Community
Ecosystem
• Rich application & platform integration
R
Predictive Analysis using Microsoft SQL Server R Services
Revolution Analytics
• Revolution Analytics was founded in 2007
• On January 23, 2015 Microsoft purchased Revolution
Analytics
Microsoft R Client
• Freely available and based on Microsoft Open R
• Run locally
• Can install any open source R packages
• Limited to two threads
• Datasets must fit in memory
• Chunking data is not available
• Can interact with R Server
What is Microsoft R Server?
• Renamed to Microsoft Machine Learning Server (SQL 2017)
• Added support for the full data science lifecycle of Python
• Multithreaded Performance, parallelization, and distributed
• RevoScaleR package machine learning, supports data
science at scale
• MicrosoftML package for distributed machine learning
• Operationalization functions for deploying to remote servers
What is SQL Server R Services?
• An implementation of Microsoft R Server, optimized for SQL
Server
• Intended to run R code stored within the database
• Supports enterprise-scale data science
• Helps you embrace the highly popular open source R
language in your business.
• R processes execute outside of the database engine
• Security is handled by SQL Server Trusted Launchpad
Set up SQL Server R Services (In-Database)
• Step 1: Install R Services (In-Database) on SQL Server 2017
• Step 2: Enable R Service
• Step 3: Launchpad Service
Predictive Analysis using Microsoft SQL Server R Services
R in SQL Server
Develop
• R Tools for Visual Studio
• RStudio
Running R code from SQL Server
• Run R code from SQL Server using the
sp_execute_external_script stored procedure
• You can:
• Run arbitrary R code
• Provide input parameters that can be referenced by the R code
• Specify an input dataset
• Return an output dataset, plot od model
• New stored procedure
EXEC sp_execute_external_script
@language = N’R’,
@script = N’[R code goes here]’,
@input_data_1 = N’[SQL input]’
[ , @input_data_1_name = N‘InputDataSet’ ]
[ , @output_data_1_name = N’OutputDataSet’ ]
[ , @params = N’parameter’ ]
WITH RESULT SETS (([SQL output]));
input_data_1_name and
output_data_1_name are optional
and default to InputDataSet and
OutputDataSet respectively
Operationalized R
1. Transform Data
2. Evaluate data
3. Build model
4. Save model to
stored proc.
SQL
Server
2017
Web
App
Deploy
Powerful R Capabilities SQL Server
• Meeting the Needs of R and SQL Users With One Platform
• R users can:
• Load, transform, visualize, learn from data assets in SQL
• Create or “train” predictive models
• Scale R analytics to big data using SQL Server R Services
• Connect to SQL from R Tools for Visual Studio or third party IDEs (R Studio)
• Deploy and operationalize applications that use these predictions
• SQL Users can:
• Embed R to access predictive analytics from SQL
• Run R scripts and Modeling algorithms from T-SQL scripts and within stored
procedures
• Extend R capabilities to data engineers and application developers
• Easily embed prediction into BI and custom applications
Demonstration
• Build a predictive model using R and SQL Server ML
Services
• Ski rental business - predict the number of rentals
that we will have on a future date
Why use R for machine learning?
• Statistical analysis comprises three common tasks:
• Data transformation
• Data visualization
• Data modeling
• R provides an array of packages to help you perform these tasks
• R also provides programming constructs to build a workflow of
operations
• R is interactive; you can quickly prototype your operations
• R packages can be written using compiled languages, for speed
• View the results using the Visualize command on the output ports
Why use Python for machine learning?
• Fully-fledged programming language
• Portable, and runs on many different operating systems
• Frequently used to provide the glue to integrate components
developed in different languages
• Excellent for transforming data between formats
• More complex than R; it supports advanced OO features
• Packages developed in other compiled languages can be
easily incorporated
Selecting the appropriate language
• R is favored by data scientists because it expresses statistical
concepts concisely
• R is favored by programmers because it is more general
purpose and powerful
• R has a broader range of statistical packages available
• Python has a more consistent syntax
• Both languages can interoperate with each other
Thanks!
Any Questions?

More Related Content

PDF
Neriah it&engupdate
PPTX
R training at Aimia
PDF
David Max SATURN 2018 - Migrating from Oracle to Espresso
PPTX
GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...
ODP
Are we there yet?
PPT
How to build high frequency trading with our matlab secrets with c++ and mysql
PPTX
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
PDF
GraphDay Paris - CAST IMAGING - Un IRM pour les systèmes IT complexes
Neriah it&engupdate
R training at Aimia
David Max SATURN 2018 - Migrating from Oracle to Espresso
GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...
Are we there yet?
How to build high frequency trading with our matlab secrets with c++ and mysql
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
GraphDay Paris - CAST IMAGING - Un IRM pour les systèmes IT complexes

What's hot (20)

PDF
Jessica Cinquanta Resume
DOC
Resume_PhilLopez_Oct2016
PDF
Visualizing Graph Data with Geographical Information #dataviz
PDF
Neo4j-Databridge: Enterprise-scale ETL for Neo4j
PPTX
AWS Dev Day 2018
PDF
Curriculum Vitae - Kenneth
PPTX
Microsoft Office and Windows Migration Readiness Suite
PDF
GraphQL Advanced
PDF
CV_Anshul_PPM
PDF
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
PDF
Barbri barbri's journey from on-prem to cloud, featuring auto-remediation wi...
PPTX
Fifth elephant 2017 Data Pipeline workshop
PPTX
GraphDay Paris - Intro & Découverte de l'outil de visualisation Neo4j Bloom
PDF
Building a web app on top of R (Slides from PAPIs 2014)
PPTX
50 Billion pins and counting: Using Hadoop to build data driven Products
DOC
Resume 2015 SW
PDF
Whats new in sql server 2008 and r2 for programmers
DOCX
Resume_Vellaiyan
PPTX
Project Overview xml
PPTX
Introduction to graphQL
Jessica Cinquanta Resume
Resume_PhilLopez_Oct2016
Visualizing Graph Data with Geographical Information #dataviz
Neo4j-Databridge: Enterprise-scale ETL for Neo4j
AWS Dev Day 2018
Curriculum Vitae - Kenneth
Microsoft Office and Windows Migration Readiness Suite
GraphQL Advanced
CV_Anshul_PPM
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
Barbri barbri's journey from on-prem to cloud, featuring auto-remediation wi...
Fifth elephant 2017 Data Pipeline workshop
GraphDay Paris - Intro & Découverte de l'outil de visualisation Neo4j Bloom
Building a web app on top of R (Slides from PAPIs 2014)
50 Billion pins and counting: Using Hadoop to build data driven Products
Resume 2015 SW
Whats new in sql server 2008 and r2 for programmers
Resume_Vellaiyan
Project Overview xml
Introduction to graphQL
Ad

Similar to Predictive Analysis using Microsoft SQL Server R Services (20)

PDF
Advanced analytics with R and SQL
PDF
Sql Server Machine Learning Services - Sql Saturday Prague 2018 #SqlSatPrague
PDF
ITCamp 2018 - Andrea Martorana Tusa - Failure prediction for manufacturing in...
PDF
Michal Marušan: Scalable R
PDF
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
PPTX
Taking R Analytics to SQL and the Cloud
PDF
microsoft r server for distributed computing
PPTX
Microsoft Data Platform Airlift 2017 Rui Quintino Machine Learning with SQL S...
PDF
Bluegranite AA Webinar FINAL 28JUN16
PDF
Analytics with R in SQL Server 2016
PDF
Using R services with Machine Learning
PPTX
DataMass Summit - Machine Learning for Big Data in SQL Server
PPTX
Analytics Beyond RAM Capacity using R
PDF
Machine learning services with SQL Server 2017
PPTX
SQL Server R Services: What Every SQL Professional Should Know
PPTX
Building a scalable data science platform with R
PDF
In-Database Analytics Deep Dive with Teradata and Revolution
PDF
Microsoft and Revolution Analytics -- what's the add-value? 20150629
PPTX
Building a Scalable Data Science Platform with R
PPTX
R at Microsoft
Advanced analytics with R and SQL
Sql Server Machine Learning Services - Sql Saturday Prague 2018 #SqlSatPrague
ITCamp 2018 - Andrea Martorana Tusa - Failure prediction for manufacturing in...
Michal Marušan: Scalable R
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
Taking R Analytics to SQL and the Cloud
microsoft r server for distributed computing
Microsoft Data Platform Airlift 2017 Rui Quintino Machine Learning with SQL S...
Bluegranite AA Webinar FINAL 28JUN16
Analytics with R in SQL Server 2016
Using R services with Machine Learning
DataMass Summit - Machine Learning for Big Data in SQL Server
Analytics Beyond RAM Capacity using R
Machine learning services with SQL Server 2017
SQL Server R Services: What Every SQL Professional Should Know
Building a scalable data science platform with R
In-Database Analytics Deep Dive with Teradata and Revolution
Microsoft and Revolution Analytics -- what's the add-value? 20150629
Building a Scalable Data Science Platform with R
R at Microsoft
Ad

More from Fisnik Doko (7)

PPTX
Developing Solutions for Azure - Best Practices
PPTX
Building Scalable Applications with Microsoft Azure
PDF
Power BI measure and visualize project success
PDF
Microsoft's modern technologies
PDF
C# 7 development
PPTX
Analyses and processing of big data in financial services
PDF
HTML5 features & JavaScript APIs
Developing Solutions for Azure - Best Practices
Building Scalable Applications with Microsoft Azure
Power BI measure and visualize project success
Microsoft's modern technologies
C# 7 development
Analyses and processing of big data in financial services
HTML5 features & JavaScript APIs

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
System and Network Administraation Chapter 3
PDF
Understanding Forklifts - TECH EHS Solution
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Introduction to Artificial Intelligence
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
history of c programming in notes for students .pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
medical staffing services at VALiNTRY
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPT
Introduction Database Management System for Course Database
PDF
AI in Product Development-omnex systems
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
System and Network Administraation Chapter 3
Understanding Forklifts - TECH EHS Solution
How Creative Agencies Leverage Project Management Software.pdf
Introduction to Artificial Intelligence
Upgrade and Innovation Strategies for SAP ERP Customers
history of c programming in notes for students .pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
Odoo POS Development Services by CandidRoot Solutions
medical staffing services at VALiNTRY
Which alternative to Crystal Reports is best for small or large businesses.pdf
Design an Analysis of Algorithms I-SECS-1021-03
PTS Company Brochure 2025 (1).pdf.......
Navsoft: AI-Powered Business Solutions & Custom Software Development
VVF-Customer-Presentation2025-Ver1.9.pptx
Odoo Companies in India – Driving Business Transformation.pdf
ManageIQ - Sprint 268 Review - Slide Deck
Introduction Database Management System for Course Database
AI in Product Development-omnex systems

Predictive Analysis using Microsoft SQL Server R Services

  • 1. Predictive Analysis using Microsoft SQL Server R Services Advanced Analytics Introduction
  • 2. Speaker • Fisnik Doko Microsoft Certified Trainer • 21 active certificates - Microsoft • MCSD: App Builder | Web applications • MCSE: Data Management and Analytics | Data Platform • MCSE: Cloud Platform and Infrastructure • Software Architect • Consultant • Speaker
  • 3. Content • Advanced Analytics Introduction • What is R? • What is Microsoft R? • Microsoft SQL Server R Services • R for machine learning • Demo • R and Python
  • 4. Diagnostic [Interactive Dashboards] Prescriptive [Recommendations & Automation] Predictive [Machine Learning] Descriptive [Reports] What should I do? What will happen? Why did it happen? What happened? Insight From data to decisions and actions
  • 5. Retail & Consumer Products Healthcare Financial Services & Insurance Government Manufacturing € Industries applying advanced analytics
  • 6. Typical Predictive Analytics Process • Prepare: Assemble, cleanse, profile and transform diverse data relevant to the subject OperationalizeModelPrepare SQL Query Data Science R in Database
  • 7. What is • A statistics programming language • A data visualization tool • Open source • 2.5+M users • Taught in most universities • Thriving user groups worldwide • 15 000+ free algorithms in CRAN • Machine Learning includes 400+ R packages • Scalable to big data • New and recent grad’s use it Language Platform Community Ecosystem • Rich application & platform integration R
  • 9. Revolution Analytics • Revolution Analytics was founded in 2007 • On January 23, 2015 Microsoft purchased Revolution Analytics
  • 10. Microsoft R Client • Freely available and based on Microsoft Open R • Run locally • Can install any open source R packages • Limited to two threads • Datasets must fit in memory • Chunking data is not available • Can interact with R Server
  • 11. What is Microsoft R Server? • Renamed to Microsoft Machine Learning Server (SQL 2017) • Added support for the full data science lifecycle of Python • Multithreaded Performance, parallelization, and distributed • RevoScaleR package machine learning, supports data science at scale • MicrosoftML package for distributed machine learning • Operationalization functions for deploying to remote servers
  • 12. What is SQL Server R Services? • An implementation of Microsoft R Server, optimized for SQL Server • Intended to run R code stored within the database • Supports enterprise-scale data science • Helps you embrace the highly popular open source R language in your business. • R processes execute outside of the database engine • Security is handled by SQL Server Trusted Launchpad
  • 13. Set up SQL Server R Services (In-Database) • Step 1: Install R Services (In-Database) on SQL Server 2017 • Step 2: Enable R Service • Step 3: Launchpad Service
  • 15. R in SQL Server
  • 16. Develop • R Tools for Visual Studio • RStudio
  • 17. Running R code from SQL Server • Run R code from SQL Server using the sp_execute_external_script stored procedure • You can: • Run arbitrary R code • Provide input parameters that can be referenced by the R code • Specify an input dataset • Return an output dataset, plot od model
  • 18. • New stored procedure EXEC sp_execute_external_script @language = N’R’, @script = N’[R code goes here]’, @input_data_1 = N’[SQL input]’ [ , @input_data_1_name = N‘InputDataSet’ ] [ , @output_data_1_name = N’OutputDataSet’ ] [ , @params = N’parameter’ ] WITH RESULT SETS (([SQL output])); input_data_1_name and output_data_1_name are optional and default to InputDataSet and OutputDataSet respectively Operationalized R
  • 19. 1. Transform Data 2. Evaluate data 3. Build model 4. Save model to stored proc. SQL Server 2017 Web App Deploy
  • 20. Powerful R Capabilities SQL Server • Meeting the Needs of R and SQL Users With One Platform • R users can: • Load, transform, visualize, learn from data assets in SQL • Create or “train” predictive models • Scale R analytics to big data using SQL Server R Services • Connect to SQL from R Tools for Visual Studio or third party IDEs (R Studio) • Deploy and operationalize applications that use these predictions • SQL Users can: • Embed R to access predictive analytics from SQL • Run R scripts and Modeling algorithms from T-SQL scripts and within stored procedures • Extend R capabilities to data engineers and application developers • Easily embed prediction into BI and custom applications
  • 21. Demonstration • Build a predictive model using R and SQL Server ML Services • Ski rental business - predict the number of rentals that we will have on a future date
  • 22. Why use R for machine learning? • Statistical analysis comprises three common tasks: • Data transformation • Data visualization • Data modeling • R provides an array of packages to help you perform these tasks • R also provides programming constructs to build a workflow of operations • R is interactive; you can quickly prototype your operations • R packages can be written using compiled languages, for speed • View the results using the Visualize command on the output ports
  • 23. Why use Python for machine learning? • Fully-fledged programming language • Portable, and runs on many different operating systems • Frequently used to provide the glue to integrate components developed in different languages • Excellent for transforming data between formats • More complex than R; it supports advanced OO features • Packages developed in other compiled languages can be easily incorporated
  • 24. Selecting the appropriate language • R is favored by data scientists because it expresses statistical concepts concisely • R is favored by programmers because it is more general purpose and powerful • R has a broader range of statistical packages available • Python has a more consistent syntax • Both languages can interoperate with each other