Book Image

Applied Supervised Learning with R

By : Karthik Ramasubramanian, Jojo Moolayil
Book Image

Applied Supervised Learning with R

By: Karthik Ramasubramanian, Jojo Moolayil

Overview of this book

R provides excellent visualization features that are essential for exploring data before using it in automated learning. Applied Supervised Learning with R helps you cover the complete process of employing R to develop applications using supervised machine learning algorithms for your business needs. The book starts by helping you develop your analytical thinking to create a problem statement using business inputs and domain research. You will then learn different evaluation metrics that compare various algorithms, and later progress to using these metrics to select the best algorithm for your problem. After finalizing the algorithm you want to use, you will study the hyperparameter optimization technique to fine-tune your set of optimal parameters. The book demonstrates how you can add different regularization terms to avoid overfitting your model. By the end of this book, you will have gained the advanced skills you need for modeling a supervised machine learning algorithm that precisely fulfills your business needs.
Table of Contents (12 chapters)
Applied Supervised Learning with R
Preface

Residual versus Leverage


If there are any influential points in the data, the Residual versus Leverage plot helps in identifying it. It's common to think that all outlier points are influential, that is, it decides how the regression line comes out. However, not all outliers are influential points. Even if a point is within a reasonable range of values (not an outlier), it could still be an influential point.

In the next plot, we will look out for far off values at the top-right corner or at the bottom-right corner. Those regions are the spaces where observation can be influential in contrast to a regression line. In Figure 4.7, the observations of the red dashed line with high Cook's distance are influential for the regression results. The regression results will be changed if we remove those observations. In the following figure, the bottom plot shows that observation 40 and 39 outside of the dashed line (high Cook's distance). Note that these observations are consistently appearing in...