9781509304318_Data Science with Microsoft SQL Server 2016_pdf.pdf
(
7325 KB
)
Pobierz
Data Science with
Microsoft
SQL Server 2016
Buck Woody, Danielle Dean, Debraj GuhaThakurta
Gagan Bansal, Matt Conners, Wee-Hyong Tok
PUBLISHED BY
Microsoft Press
A division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright © 2016 by Microsoft Corporation
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any
form or by any means without the written permission of the publisher.
ISBN: 978-1-5093-0431-8
Microsoft Press books are available through booksellers and distributors worldwide. If you need
support related to this book, email Microsoft Press Support at
mspinput@microsoft.com.
Please tell us
what you think of this book at
http://aka.ms/tellpress.
This book is provided “as-is” and expresses the author’s views and opinions. The views, opinions and
information expressed in this book, including URL and other Internet website references, may change
without notice.
Some examples depicted herein are provided for illustration only and are fictitious. No real association
or connection is intended or should be inferred.
Microsoft and the trademarks listed at
http://www.microsoft.com
on the “Trademarks” webpage are
trademarks of the Microsoft group of companies. All other marks are property of their respective
owners.
Acquisitions Editor:
Kim Spilker
Developmental Editor:
Bob Russell, Octal Publishing, Inc.
Editorial Production:
Dianne Russell, Octal Publishing, Inc.
Copyeditor:
Bob Russell
Visit us today at
microsoftpressstore.com
• Hundreds of titles available
– Books, eBooks, and
online resources from industry experts
• Free U.S. shipping
• eBooks in multiple formats
– Read on your computer,
tablet, mobile device, or e-reader
• Print & eBook Best Value Packs
• eBook Deal of the Week
– Save
up to 60% on featured titles
• Newsletter and special offers
– Be the first to hear about new
releases, specials, and more
• Register your book
– Get
additional benefits
Contents
Foreword ................................................................................................................................................... v
Introduction ............................................................................................................................................ vii
How this book is organized ............................................................................................................................................... vii
Who this book is for ............................................................................................................................................................. vii
Acknowledgements .............................................................................................................................................................. vii
Free ebooks from Microsoft Press ................................................................................................................................. viii
Errata, updates, & book support .................................................................................................................................... viii
We want to hear from you ................................................................................................................................................ viii
Stay in touch ........................................................................................................................................................................... viii
Chapter 1: Using this book...................................................................................................................... 1
For the data science or R professional ............................................................................................................................ 1
Solution example: customer churn .............................................................................................................................. 2
Solution example: predictive maintenance and the Internet of Things ........................................................ 2
Solution example: forecasting........................................................................................................................................ 2
For those new to R and data science ............................................................................................................................... 3
Step one: the math ............................................................................................................................................................. 3
Step two: SQL Server and Transact-SQL .................................................................................................................... 4
Step three: the R programming language and environment ............................................................................ 5
Chapter 2: Microsoft SQL Server R Services.......................................................................................... 6
The advantages of R on SQL Server ................................................................................................................................. 6
A brief overview of the SQL Server R Services architecture .................................................................................... 7
SQL Server R Services ........................................................................................................................................................ 7
Preparing to use SQL Server R Services .......................................................................................................................... 8
Installing and configuring ................................................................................................................................................ 8
Server ....................................................................................................................................................................................... 9
Client ..................................................................................................................................................................................... 10
Making your solution operational ................................................................................................................................. 12
ii
Contents
Using SQL Server R Services as a compute context ........................................................................................... 12
Using stored procedures with R Code ..................................................................................................................... 14
Chapter 3: An end-to-end data science process example ................................................................. 15
The data science process: an overview ........................................................................................................................ 15
The data science process in SQL Server R Services: a walk-through for R and SQL developers .......... 17
Data and the modeling task ........................................................................................................................................ 17
Preparing the infrastructure, environment, and tools ....................................................................................... 18
Input data and SQLServerData object ..................................................................................................................... 23
Exploratory analysis ............................................................................................................................................................. 25
Data summarization ........................................................................................................................................................ 25
Data visualization ............................................................................................................................................................. 26
Creating a new feature (feature engineering) ........................................................................................................... 28
Using R functions ............................................................................................................................................................. 28
Using a SQL function ...................................................................................................................................................... 29
Creating and saving models ............................................................................................................................................. 31
Using an R environment ................................................................................................................................................ 31
Using T-SQL........................................................................................................................................................................ 32
Model consumption: scoring data with a saved model ................................................................................... 33
Evaluating model accuracy ............................................................................................................................................... 35
Summary .................................................................................................................................................................................. 36
Chapter 4: Building a customer churn solution .................................................................................. 37
Overview ................................................................................................................................................................................... 37
Understanding the data ................................................................................................................................................ 38
Building the customer churn model.............................................................................................................................. 40
Step-by-step ...................................................................................................................................................................... 41
Summary .................................................................................................................................................................................. 46
Chapter 5: Predictive maintenance and the Internet of Things ....................................................... 47
What is the Internet of Things? ....................................................................................................................................... 48
Predictive maintenance in the era of the IoT............................................................................................................. 48
Example predictive maintenance use cases ............................................................................................................... 49
Before beginning a predictive maintenance project.......................................................................................... 50
The data science process using SQL Server R Services ............................................................................................ 51
iii
Contents
Plik z chomika:
kisuke
Inne pliki z tego folderu:
10_essential_tools_for_mobile_working_article.pdf
(380 KB)
2934_WSG_Win8_ShortcutKeys_QuickReferenceGuide_External.docx
(235 KB)
3a_Microsoft_Classroom_Deployment.pdf
(2017 KB)
4114_Configuration_as_code_Automating_Windows_Server_2016.docx
(44 KB)
4133_Power-BI-mobile-apps—enabling-data-analytics-on-the-go_Article.docx
(673 KB)
Inne foldery tego chomika:
Fantastyka, opowieści, dzieła itp
Git Essential Training
Inne
Masterton Graham
RPG
Zgłoś jeśli
naruszono regulamin