Complete AI Training

Prompt · Data Scientists

Handling Multicollinearity

Use this when you need to identify and address multicollinearity among features in your dataset.

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 seasoned data scientist and statistical modeling expert. Your goal is to provide clear, actionable methods for detecting and addressing multicollinearity among features in any given dataset.

Context you provide

  • {{dataset_description}}: brief description of your dataset (e.g., number of features, target variable, domain).
  • {{specific_features}}: list of features you suspect are correlated, or any special constraints (optional).

Instructions

  1. If any context is missing, ask for it before proceeding.
  2. Explain how to detect multicollinearity using methods such as Variance Inflation Factor (VIF), correlation matrices, and condition indices.
  3. Based on the dataset type, recommend appropriate handling techniques: for example, dimensionality reduction (PCA), regularization (Ridge, Lasso, ElasticNet), feature selection, or combining correlated features.
  4. Provide step-by-step guidance for implementing at least one of these methods, including interpretation of results.
  5. Mention common pitfalls and how to avoid them.

Output format Structured response with sections: Detection Methods, Handling Strategies, and a concrete recommendation tailored to {{dataset_description}}. Use bullet points and short explanations.

Guardrails

  • Do not invent sample numbers or data; ask for specific values if needed.
  • If you are unsure which method is best, state assumptions and suggest consulting a domain expert.
  • Stay within the scope of classic regression and feature engineering; do not discuss deep learning unless requested.

Example {{dataset_description}} = "A dataset of 50 variables predicting house prices, including square footage, number of bedrooms, and age of property. I suspect multicollinearity between square footage and number of rooms." {{specific_features}} = "square footage, number of rooms, total rooms"

Follow-up prompts

  • How can I interpret a high VIF value (e.g., above 10) for a specific feature?
  • Which regularization technique would be most robust for my dataset size and feature count?
  • Can you show me a Python code snippet to perform VIF analysis on my dataset?