Walk through the pipeline step-by-step: first handle data quality issues like zero-variance columns, then z-score normalize features, fit logistic regression with explicit choices about regularization and intercept, and finally rank features by absolute coefficient magnitude. Emphasize that normalization is crucial for comparing coefficients and that regularization affects feature ranking.
Pro tip: Mention that you would use a Pipeline to avoid data leakage and that you'd consider standardizing after splitting data, not before. Also, note that if features are on different scales, coefficients are not comparable without normalization.
Identify and handle zero-variance columns (drop them) and check for missing values. Split data into train and test sets before normalization to prevent leakage.
Compute mean and standard deviation for each feature on the training set, then transform both train and test sets using these statistics. This ensures features are on the same scale.
Choose regularization (L1 or L2) and its strength (C), and decide whether to fit an intercept. Fit the model on the normalized training data.
Extract model coefficients, take absolute values, and sort in descending order. Return the top 3 feature names.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.