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

Chapter 8. Supervised Machine Learning

In Chapter 6, Intermediate Statistics and Graphs, we read about intermediate statistics with linear regression. I will continue this chapter from that point. Linear regression is already an algorithm you can use for predictions. You can make predictions with the directed, or the supervised, algorithms. Supervised algorithms have a target, or a dependent variable. They try to explain the values of that variable with the formula and the values of the independent variables. This explanation is stored in a model, which you use to predict the target variable value on a new dataset. The dependent variable supervises the development of the model. In a real project, you create many models, and then you deploy the one that suits your business needs the best. Therefore, you need to evaluate the models before the deployment.

In this chapter, I will explain the following:

  • Evaluating predictive models
  • Using the Naive Bayes algorithm
  • Predicting with logistic regression...