Hi all I would love to hear your answers on this. Lets say I have two variables, voltage and current, in my data set. I could add another feature by squaring current (so as to calculate power).

Is this an example of feature engineering?

Recently I tried to predict on a diameter prediction on asteroids and I took the natural log of some features which worked well.

Can someone provide some insight as to why this may have improved the model's performance?

  • $\begingroup$ Data cleaning can be seen as feature engineering. As a modeler, we prepare the data as input to our model, as result, that might require various tasks such as imputing values, transforming our data (e.g. logging or squaring), performing research to determine why values might be missing. As for logging, with respect to linear models, this could improve model performance because it will linearize the relation between the feature and the response. With that said, sometimes these transformations can hurt your performance and it should be evaluate on a case by case basis. $\endgroup$
    – nwaldo
    Apr 19 '20 at 17:48

Sure, that's feature engineering.

If you're fitting a linear model, then you are looking for features that have a linear relationship with the predicted value. If you're predicting, say, the cost per hour of a device consuming current I, then clearly that's directly related to power not current, so $I^2$ is more likely to be useful.

What you want to be careful about is trying a bunch of transformations of the input blindly; it's possible for a small data set that one odd function of an input happens to be predictive in that sample, but doesn't generalize.


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.