Does it make sense having scale and log transformed variables to select models?

I have several data to work with in order to select models.

Some of the predictor variables vary from 0 to more than 2000 square meters(Area). And some goes from 200 to 800 meters(Altitude). Others from 0 to 30 degrees(Slope). All of them have non-parametric distributions.

My response variable goes around 50 units.

Does it make any sense using log for some variables and scale for others so I can get less skew for my predictor variables? Or should I use log only or scale only for the entire dataset?

• I would suggest to make this question more clear (distinguish "data" and "feature"). For example, you might have a data set of many people, the heights of individual vary from 100cm to 200cm, but the weights vary from 20kg to 100kg. And what do you mean by "nonparametric"? – doubllle Jul 19 '18 at 14:01
• I think there is no harm to transform each feature separately when you want to make a predictive model by combining all the features. The reason is simply that the values of each feature are describing certain characteristic of a system, and the units of values are somehow artifacts we humans are using. – doubllle Jul 19 '18 at 14:43
• What do you mean by "response variable goes around 50 units"? What is your response variable? Is it numerical or categorical? – Yilun Zhang Jul 19 '18 at 14:52
• @YilunZhang, sorry. I mean I have a numerical response variable and its value has an average of approximately 50. – Gilmar Neves Jul 19 '18 at 15:13

1 Answer

Whether to scale or transform your variables depends largely on the type of model you are using.

For example, if you are using linear regression, due to the assumptions of linear regression, you would probably want to transform your variables so that they look as normal as possible (log scaling is sometimes very useful). Sometimes it even involves bucketing your numerical variables to categorical variables in order to make your distribution much smoother. You probably don't need to scale or normalize your variables because the coefficient your are fitting do control that.

If you are using random forest regressor, you should be able to handle such data without any processing because the tree building process will bucket and split your variables at the best splitting points according to the decision criteria the algorithm is set to use.

• Normally-distributed regressors are by no means part of the assumption set for linear regression. Outliers in $x-$space are problematic, but short of that, non-normally distributed regressors (think dummy variables) are OK. – jbowman Jul 19 '18 at 21:18