# Is it suitable to change a feature by itself to generate an another feature?

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?

• 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. Apr 19 '20 at 17:48

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.