Feature engineering is the process of turning raw data into input variables a model can learn from effectively. It covers selecting relevant quantities, transforming them and creating new derived features. Typical operations are log-transforming skewed distributions, standardising and normalising scales, handling missing values, encoding categorical variables via one-hot or target encoding, binning continuous variables into intervals, creating interactions and ratios between variables, and extracting from timestamps, where a bare date yields features such as day of week, month, proximity to a public holiday, or cyclical sine and cosine components. For time series, lagged values and rolling aggregations are added. On tabular data, good feature engineering is usually more valuable than the choice of algorithm, and together with gradient boosting it forms the backbone of practical machine learning. The critical risk is data leakage, if a feature ends up containing information known only after the moment of prediction. In deep learning on images and text it has largely been replaced by learned representations.
It is like preparing ingredients before cooking. A chef does not throw a whole unwashed carrot with soil and leaves into the pot – he peels it, cuts it and adds it at precisely the moment it is needed. A model works the same way: give it the date “2024-03-17” as text and it will do nothing with it. Give it “Sunday afternoon, three days before month end” and it finds the connection instantly. And the best chefs do not excel because they own a pricier stove, but because they know what to do with the carrot. One rule is sacred: never put information from the future into the soup, that is, anything you cannot yet know at the time of the decision.