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...