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

Feature Engineering


The algorithms we use in machine learning will perform based on the quality and goodness of the data; they do not have any intelligence of their own. The better and innovative you become in designing features, the better the model performance. Feature engineering in many ways helps in bringing the best out of data. The term feature engineering essentially refers to the process of the derivation and transformation of given features, thus better characterizing the meaning of the features and representing the underlying problem of the predictive model. By this process, we anticipate the improvement in the model's predictability power and accuracy.

Discretization

In Chapter 3, Introduction to Supervised Learning, we converted the numeric values of a 3-hour rolling average of PM2.5 in the Beijing dataset to the binary values 1 and 0 for logistic regression, based on the threshold of 35, where 1 means normal and 0 means above normal. The process is called discretization, also...