Book Image

Data Science with SQL Server Quick Start Guide

By : Dejan Sarka
Book Image

Data Science with SQL Server Quick Start Guide

By: Dejan Sarka

Overview of this book

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.
Table of Contents (15 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Trees, forests, and more trees


Probably the most popular classification and prediction algorithm is the decision trees algorithm. The algorithm gives quite good results and is easy to understand. The algorithm is also called recursive partitioning. You start with all the data in one group. Then you split the data with values of every single input variable, one by one. After each split, you check the distribution of the target variable in the new subgroups. You keep the split that gives you the purest subgroups in terms of the target variable and disregard all other splits. Then you split the subgroups again and again, until the purity of the target variable grows, or until some other stopping condition.

Decision trees use discrete variables. If some variables are continuous and the target variable is a continuous one as well, then you get the regression trees. Discrete variables are used for splits, and continuous variables for the regression formula in each branch of the tree. You get a...