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

Improving the Model


So far, we have seen the problems in the data, but you may ask whether you can fix or improve it. Let's discuss some ways to do that. In this section, you will learn some of the ways, such as variable transformation, dealing with outlier points, adding interaction effect and deciding to go with a non-linear model.

Transform the Predictor or Target Variable

The most common way to improve the model is to transform one or more variables (could also be the target variable) using a log function.

Log transformation corrects the skewed distribution. It gives the ability to handle the skewness in the data and at the same time the original value could be easily computed once the model is built. The most popular log transformation is natural log. A more detailed explanation for log transformation could be found in the section Log Transformation of Chapter 6, Feature Selection and Dimensionality Reduction.

The objective is to bring the normal distribution in the data by transforming...