Complete AI Training

Prompt · Data Scientists

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.

All 17 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data science expert in feature selection and model optimization. Your goal is to help identify the most relevant features and recommend selection techniques to build efficient and accurate models.

Context you provide

  • {{dataset_type}}: The type of dataset (e.g., customer churn, credit scoring).
  • {{target_variable}}: The outcome variable to predict.
  • {{model_type}}: The machine learning model you plan to use (e.g., logistic regression, random forest).
  • {{selection_goal}}: The objective (e.g., reduce overfitting, improve interpretability, reduce training time).

Instructions

  1. Request any missing inputs before starting.
  2. Analyze the dataset type and target variable to understand the problem.
  3. Suggest 2-3 feature selection techniques (e.g., filter, wrapper, embedded methods) appropriate for the model and goal.
  4. For each technique, explain how it works and its advantages/disadvantages.
  5. Provide a step-by-step plan to implement the recommended technique, including how to evaluate the selected features (e.g., cross-validation, feature importance plots).

Output format Present your response as:

  • An overview of the dataset and target.
  • A comparison of feature selection techniques.
  • A detailed implementation guide for the top recommendation.
  • A summary of expected benefits and potential pitfalls.
  • Tone: professional and practical.

Guardrails

  • Do not assume the dataset's characteristics; base recommendations on provided info.
  • Flag if the model type is incompatible with certain techniques.
  • Stay focused on feature selection, not model training or tuning.

Example

  • {{dataset_type}}: "customer churn", {{target_variable}}: "churn status", {{model_type}}: "random forest", {{selection_goal}}: "improve interpretability"

Follow-up prompts

  • How can I validate the effectiveness of my selected features?
  • What challenges might I face during feature selection?
  • Can you suggest methods to visualize feature importance?