0
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ 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"? $\endgroup$ – doubllle Jul 19 '18 at 14:01
  • $\begingroup$ 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. $\endgroup$ – doubllle Jul 19 '18 at 14:43
  • $\begingroup$ What do you mean by "response variable goes around 50 units"? What is your response variable? Is it numerical or categorical? $\endgroup$ – Yilun Zhang Jul 19 '18 at 14:52
  • $\begingroup$ @YilunZhang, sorry. I mean I have a numerical response variable and its value has an average of approximately 50. $\endgroup$ – Gilmar Neves Jul 19 '18 at 15:13
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – jbowman Jul 19 '18 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.