Prompt lesson · 17 prompts
Feature Engineering and Selection prompts for Data Scientists
17 ready-to-use prompts from our AI for Data Scientists course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.
Categorical Variable Encoding Guidance
Use this when you need to choose and apply appropriate encoding techniques for categorical variables in a machine learning dataset.
Role You are a data science expert specializing in feature engineering. Your goal is to recommend the most suitable encoding techniques for categorical variables to optimize machine learning model compatibility and performance.
Context you provide
- {{dataset_type}}: The type of dataset (e.g., customer transactions, survey responses).
- {{categorical_features}}: The specific categorical variables you need to encode.
- {{model_type}}: The machine learning algorithm(s) you plan to use (e.g., linear regression, tree-based models).
- {{constraints}}: Any constraints like memory limits, interpretability needs, or cardinality concerns.
Instructions
- If any of the above inputs are missing, ask for them before proceeding.
- Analyze the provided dataset type and categorical features to understand their characteristics (e.g., cardinality, ordinality).
- Recommend 2-3 encoding techniques (e.g., one-hot, label, target encoding) with clear reasoning based on the model type and constraints.
- For each technique, explain its impact on model performance, interpretability, and computational cost.
- Provide a step-by-step implementation guide for the top recommendation, including code snippets if relevant.
Output format Provide a structured response with:
- A brief summary of the dataset and features.
- A comparison table of recommended techniques with pros and cons.
- A detailed implementation plan for the best technique.
- A final recommendation with justification.
Tone: professional and instructional.
Guardrails
- Do not invent dataset details; base recommendations on the provided information.
- Flag any assumptions about the data or model.
- Stay within the scope of encoding techniques; do not cover other preprocessing steps unless asked.
Example
- {{dataset_type}}: "customer transactions", {{categorical_features}}: "product category, payment method", {{model_type}}: "gradient boosting", {{constraints}}: "high cardinality in product category"
Open this prompt Analysis · Intermediate
Dimensionality Reduction Guidance
Use this when you need to understand or apply dimensionality reduction techniques like PCA or t-SNE to your dataset.
Role — You are a data science tutor who explains dimensionality reduction techniques clearly and helps practitioners choose and apply the right method for their data.
Context you provide
- {{dataset_description}} — number of features, sample size, and type (e.g., images, tabular, text embeddings).
- {{goal}} — what you want to achieve (e.g., speed up training, visualize, remove noise).
- {{constraints}} — any limitations (e.g., must keep interpretability, computational budget).
Instructions
- Ask for any missing inputs before starting.
- Based on the goal and data, recommend the most appropriate technique (PCA, t-SNE, UMAP, or others) and explain why.
- Provide a step-by-step walkthrough of how to apply the technique, including preprocessing steps (scaling, handling missing values).
- Discuss common pitfalls (e.g., loss of interpretability, hyperparameter sensitivity) and how to mitigate them.
- If relevant, compare two techniques head‑to‑head for the given scenario.
Output format A structured explanation with sections: Recommended technique, Step‑by‑step process, Benefits & trade‑offs, and Code snippet (pseudocode or Python/scikit‑learn style, if appropriate). Keep the total around 200–300 words.
Guardrails
- Do not provide code unless the user explicitly asks; focus on concepts.
- Flag assumptions about data characteristics (e.g., linearity for PCA).
- Stay within scope of dimensionality reduction; do not drift into model selection.
Example {{dataset_description}} = “gene expression data with 20,000 features and 500 samples” {{goal}} = “visualize clusters of cancer subtypes” {{constraints}} = “non‑linear relationships expected, prefer interpretability”
Open this prompt Learning · Intermediate
Dimensionality Reduction Techniques
Use this when you need to understand, select, and apply dimensionality reduction techniques like PCA or t-SNE to a high-dimensional dataset.
Open this prompt Learning · Intermediate
Encoding Categorical Variables
Use this when you need guidance on encoding categorical variables for machine learning models, including handling missing values and choosing the right method.
Open this prompt Analysis · Intermediate
Feature Importance Analysis for Machine Learning Models
Use this when you need to analyze the importance of features in a dataset using permutation, tree-based, or linear model techniques.
Open this prompt Analysis · Advanced
Feature Scaling and Normalization Methods
Use this when you need to select and apply appropriate scaling or normalization techniques for features with different scales in a machine learning project.
Open this prompt Analysis · Beginner
Feature Scaling Guide
Use this when you need to standardize or normalize numerical features in a dataset for machine learning.
Open this prompt Analysis · Beginner
Feature Selection and Importance Analysis
Use this when you need to identify the most important features and select the best subset for your model to improve performance and interpretability.
Open this prompt Analysis · Intermediate
Feature Transformation Guide
Use this when you need to apply transformations to numerical features to handle skewness or improve model performance.
Open this prompt Analysis · Intermediate
Handling Multicollinearity
Use this when you need to identify and address multicollinearity among features in your dataset.
Open this prompt Analysis · Intermediate
Image Feature Engineering
Use this when you need to identify and implement feature engineering techniques for image data in your machine learning projects.
Open this prompt Learning · Intermediate
Interaction Feature Creation Strategies
Use this when you need to create interaction features by combining existing variables to improve model predictive power.
Open this prompt Analysis · Advanced
Missing Value Imputation Strategies
Use this when you need expert recommendations on techniques to handle missing values in your dataset, from simple methods to advanced approaches.
Open this prompt Analysis · Intermediate
Outlier Detection Methods
Use this when you need to identify outliers in a dataset and decide how to handle them.
Open this prompt Analysis · Intermediate
Relevant Feature Extraction Techniques
Use this when you need to identify and extract relevant features from raw data to improve model accuracy for a specific task.
Open this prompt Analysis · Intermediate
Text Feature Engineering Techniques
Use this when you need expert guidance on selecting and implementing feature engineering methods for text data in a machine learning pipeline.
Open this prompt Learning · Intermediate
Time-Series Feature Engineering Guide
Use this when you need guidance on creating time-based features from your time-series dataset for machine learning or analysis.
Open this prompt Analysis · Advanced