Data Science with SQL Server Quick Start Guide
eBook - ePub

Data Science with SQL Server Quick Start Guide

Integrate SQL Server with data science

  1. 206 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Data Science with SQL Server Quick Start Guide

Integrate SQL Server with data science

About this book

Get unique insights from your data by combining the power of SQL Server, R and Python

Key Features

  • Use the features of SQL Server 2017 to implement the data science project life cycle
  • Leverage the power of R and Python to design and develop efficient data models
  • find unique insights from your data with powerful techniques for data preprocessing and analysis

Book Description

SQL Server only started to fully support data science with its two most recent editions. If you are a professional from both worlds, SQL Server and data science, and interested in using SQL Server and Machine Learning (ML) Services for your projects, then this is the ideal book for you.

This book is the ideal introduction to data science with Microsoft SQL Server and In-Database ML Services. It covers all stages of a data science project, from businessand data understanding, through data overview, data preparation, modeling and using algorithms, model evaluation, and deployment.

You will learn to use the engines and languages that come with SQL Server, including ML Services with R and Python languages and Transact-SQL. You will also learn how to choose which algorithm to use for which task, and learn the working of each algorithm.

What you will learn

  • Use the popular programming languages, T-SQL, R, and Python, for data science
  • Understand your data with queries and introductory statistics
  • Create and enhance the datasets for ML
  • Visualize and analyze data using basic and advanced graphs
  • Explore ML using unsupervised and supervised models
  • Deploy models in SQL Server and perform predictions

Who this book is for

SQL Server professionals who want to start with data science, and data scientists who would like to start using SQL Server in their projects will find this book to be useful. Prior exposure to SQL Server will be helpful.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Data Science with SQL Server Quick Start Guide by Dejan Sarka in PDF and/or ePUB format, as well as other popular books in Computer Science & Data Mining. We have over one million books available in our catalogue for you to explore.

Information

Unsupervised Machine Learning

Finally, we are there—we are going to do some real data science now. In the last two chapters, I am going to introduce some of the most popular advanced data mining and machine learning algorithms. I will show you how to use them to get in-depth knowledge from your data.
The most common separation of the algorithms is separation into two groups: the unsupervised, or undirected, and the supervised, or directed algorithms. The unsupervised ones have no target variable. You just try to find some interesting patterns, for example, some distinctive groups of cases, in your data. Then you need to analyze the results to make the interpretation possible. Talking about groups of cases, or clusters you don't know the labels of those clusters in advance. Once you determine them, you need to check the characteristics of input variables in the clusters in order to get an understanding of the meaning of the clusters.
Before starting with the advanced algorithms, I will make a quick detour. I will just show you how you can install additional R and Python packages on the server side, for ML Services (In-Database).
This chapter covers the following:
  • Installing ML Services (In-Database) packages
  • Performing market-basket analysis
  • Finding clusters of similar cases
  • Dimensionality-reduction with principal-component analysis
  • Extracting underlying factors from variables

Installing ML services (In-Database) packages

Because of security, you cannot just call the install.packages() R function from the sys.sp_exacute_external_script system procedure on the server side. There are many other ways to do it. You can find the complete list of options for installing R packages in the article Install new R packages on SQL Server at https://docs.microsoft.com/en-us/sql/advanced-analytics/r/install-additional-r-packages-on-sql-server?view=sql-server-2017. I will just show one option here, the one I am using when writing this book. I have my SQL Server installed on a virtual machine, and I can enable a web connection for the machine. Then the process of installing an additional R package is simple. You just need to run the R console, R.exe, from the ML Services (In-Database) installation, which is located in the C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\R_SERVICES\bin folder for the default instance installation. You need to run R.exe as an administrator:
Running R.exe with administrative permissions
Before starting to install a package, I check the installed packages with the following T-SQL code:
USE AdventureWorksDW2017;
EXECUTE sys.sp_execute_external_script
@language=N'R',
@script =
N'str(OutputDataSet);
instpack <- installed.packages();
NameOnly <- instpack[,1];
OutputDataSet <- as.data.frame(NameOnly);'
WITH RESULT SETS (
( PackageName nvarchar(20) )
);
GO
Initially, I had 57 packages installed. Then I used the install.packages("dplyr") command in R.exe to install the dplyr library. After installation, I closed the R.exe console with the q() function. Then I used...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. Packt Upsell
  4. Contributors
  5. Preface
  6. Writing Queries with T-SQL
  7. Introducing R
  8. Getting Familiar with Python
  9. Data Overview
  10. Data Preparation
  11. Intermediate Statistics and Graphs
  12. Unsupervised Machine Learning
  13. Supervised Machine Learning
  14. Other Books You May Enjoy