Feature engineering and data preparation