← Citadel Interview Insights

Citadel·Data Scientist·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Jun 2026

Summary

Citadel data scientist interview, technical screen where they handed me a machine learning pipeline task and told me no autocomplete. The whole thing was about whether you actually know the steps cold, not just that you can Google them.

Questions Asked (1)

Q1

Build a complete linear regression pipeline from scratch in Python, no code completion allowed. The pipeline should handle train/validation splitting with a fixed seed, missing value imputation, one-hot encoding of categoricals, numeric scaling, OLS model training, and evaluation via RMSE and R-squared. Make sure transformers are only fit on training data. Report the fitted coefficients and interpret the results.

Technical Trade-offsData ModelingAlgorithms & Data Structures
Author's notes

This is basically a 'do you actually know ML pipelines or do you just know how to tab-complete sklearn' question.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the pipeline architecture and emphasizing the importance of fitting transformers only on training data to prevent leakage. Then, walk through each step from data splitting to model evaluation, explaining the rationale behind choices like using a fixed seed for reproducibility and handling missing values and categorical variables appropriately. Finally, discuss the interpretation of coefficients in the context of the problem and the trade-offs involved.

Pro tip: Mention that you would use sklearn's Pipeline and ColumnTransformer to encapsulate preprocessing and model training, ensuring that all transformations are applied consistently and that fitting is restricted to training data. This demonstrates production-ready thinking and awareness of common pitfalls.

1. Data Splitting and Preprocessing Setup

Split the data into training and validation sets using a fixed random seed to ensure reproducibility. Set up a preprocessing pipeline that includes imputation for missing values, one-hot encoding for categorical variables, and scaling for numeric features, ensuring that all transformers are fit only on the training data.

2. Model Training and Evaluation

Train an OLS linear regression model on the preprocessed training data. Evaluate its performance on the validation set using RMSE and R-squared, and discuss how these metrics inform model quality.

3. Coefficient Interpretation

Extract the fitted coefficients from the model and interpret them in the context of the features. Explain how each feature impacts the target variable, considering the scaling and encoding applied.

4. Discussion of Trade-offs and Assumptions

Discuss the assumptions of linear regression (e.g., linearity, independence, homoscedasticity, normality of residuals) and any trade-offs made in preprocessing (e.g., imputation method, encoding choice). Mention potential limitations and how they might affect results.

Key Points to Mention

  • Importance of fitting transformers only on training data to avoid data leakage
  • Use of fixed random seed for reproducibility in train/validation split
  • Handling missing values with imputation (e.g., mean/median for numeric, most frequent for categorical)
  • One-hot encoding for categorical variables and scaling for numeric features
  • Evaluation metrics: RMSE and R-squared, and their interpretation
  • Interpretation of coefficients in the context of feature scaling and encoding

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.