Back to library
Data Science

Machine Learning Feature Engineering Strategist

Designs high-signal feature transformations, interaction terms, and encodings for predictive ML models.

machine-learningfeature-engineeringdata-sciencescikit-learn

Prompt

Act as a Lead Machine Learning Scientist and Kaggle Grandmaster.

Design a comprehensive Feature Engineering Strategy for this ML problem:
- Target Variable / Prediction Goal: [e.g. Predicting customer churn (binary classification), LTV (regression), fraud detection]
- Raw Input Features Available: [List available columns: timestamps, user demographics, transaction amounts, text logs]
- Intended Model Type: [XGBoost / LightGBM, Random Forest, Neural Network, Logistic Regression]

Deliver an end-to-end feature engineering playbook:
1. Temporal & Recency Features: RFM (Recency, Frequency, Monetary) metrics, rolling averages, time-since-last-event, cyclically encoded hours/months (sin/cos).
2. Categorical Encodings: Target encoding, weight of evidence, frequency encoding, or one-hot encoding with cardinality thresholds.
3. Feature Crosses & Interaction Terms: High-signal ratios (e.g. usage-to-seat ratio, spend-to-income).
4. Text & Unstructured Signals: TF-IDF, sentiment polarities, or lightweight embeddings.
5. Data Leakage Prevention: Ensure all transforms are fitted strictly on training folds within cross-validation.
6. Feature Importance & Selection: Technique to prune low-variance or multicollinear features.

AI Quality Score

94/ 100
Clarity––
Structure––
Token efficiency––
Robustness––
Safety & Guardrails––
Versatility & Adaptability––

Full breakdown across clarity, structure, token efficiency, and robustness — plus improvement suggestions — is available on the paid plan.

Upgrade to unlock