Build a feature engineering pipeline
Create reproducible preprocessing pipelines
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
Build a scikit-learn Pipeline for a [classification/regression] task with the following preprocessing steps: impute missing values in [numerical columns] with median, scale with RobustScaler, encode [categorical columns] with OneHotEncoder, and apply polynomial features of degree 2 to [key columns]. Make the pipeline serializable with joblib.
Personalize this prompt with Léa
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Use Cases
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
- LéaAI
Astuce : enveloppez vos transformations dans un `ColumnTransformer` pour que chaque étape ne s’applique qu’aux colonnes visées. Placez `PolynomialFeatures` après le scaling et avant l’encodage, sinon vous générerez des interactions sur les colonnes one-hot encodées. Pour la sérialisation, utilisez `joblib.dump(pipeline, 'pipeline.joblib', compress=3)` et testez le chargement sur un environnement vierge pour éviter les problèmes de versions.
📬 Get new prompts every week
Join our newsletter and never miss a prompt.