← Disney Interview Insights

Disney·Machine Learning Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Disney ML Engineer interview that was basically a full Jupyter notebook walkthrough, spam classifier from scratch. More hands-on than I expected for a phone screen style round, felt like a mini take-home crammed into a live session.

Questions Asked (3)

Q1

Build a spam vs. not-spam text classifier in a Jupyter notebook using a Naive Bayes model. Walk through the full pipeline from raw text to evaluation.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This was the whole interview basically.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Walk through the end-to-end NLP pipeline in a logical order: data loading and cleaning, feature extraction with TF-IDF or CountVectorizer, model training with Multinomial Naive Bayes, and evaluation using appropriate metrics. Emphasize practical considerations like handling class imbalance, avoiding data leakage, and interpreting results for a business context.

Pro tip: Mention that you'd use a stratified train-test split and cross-validation to ensure reliable evaluation, and discuss how Naive Bayes' independence assumption affects performance on text data—showing you understand both the model's strengths and limitations.

1. Data Loading and Exploration

Load the spam dataset (e.g., SMS Spam Collection) and perform initial EDA: check class distribution, text length, and sample messages. Discuss handling class imbalance if present.

2. Text Preprocessing

Clean the text: lowercase, remove punctuation, stopwords, and possibly stem/lemmatize. Explain trade-offs (e.g., stopword removal may hurt spam detection if words like 'free' are stopwords).

3. Feature Extraction

Convert text to numerical features using TF-IDF or CountVectorizer. Discuss n-grams, max_features, and the importance of fitting the vectorizer only on training data to avoid leakage.

4. Model Training and Validation

Train a Multinomial Naive Bayes classifier. Use cross-validation (e.g., 5-fold stratified) to tune hyperparameters like smoothing (alpha) and evaluate model stability.

5. Evaluation and Interpretation

Evaluate on a held-out test set using accuracy, precision, recall, F1-score, and ROC-AUC. Discuss the confusion matrix and business implications (e.g., false positives vs. false negatives).

Key Points to Mention

  • Handling class imbalance (e.g., using class weights or resampling) and its impact on evaluation metrics.
  • The importance of avoiding data leakage by fitting vectorizers only on training data.
  • Naive Bayes' assumptions (conditional independence) and why it works well for text despite violations.
  • Choice of evaluation metrics: precision/recall trade-off and why accuracy alone can be misleading.
  • Hyperparameter tuning (e.g., Laplace smoothing alpha) and its effect on model performance.
  • Practical deployment considerations: model interpretability, retraining, and monitoring drift.

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

Q2

How would you handle class imbalance in a spam detection dataset, and why does it matter for the metrics you choose?

Product Analytics & MetricsTechnical Trade-offs
Author's notes

F1 score came up naturally here and I was glad I led with that instead of accuracy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that spam detection typically has severe class imbalance and explain how you would diagnose it (e.g., class distribution, business costs). Then walk through a layered strategy: data-level techniques, algorithm-level techniques, and threshold tuning, always tying each choice back to why accuracy is misleading and which metrics (precision, recall, PR-AUC) align with the business goal of minimizing false positives vs. false negatives.

Pro tip: Frame the metric choice around the cost of errors in the product context—e.g., a false positive (legitimate email marked spam) is often far more damaging to user trust than a false negative—and mention that you would validate the chosen threshold with stakeholders before deployment.

1. Diagnose the imbalance and define costs

Quantify the class ratio and clarify the relative cost of false positives vs. false negatives with product stakeholders. This anchors every subsequent technique and metric choice in business impact.

2. Apply data-level techniques

Discuss resampling methods such as SMOTE, random oversampling of spam, or undersampling of ham, noting their trade-offs (e.g., synthetic noise, information loss). Mention that these should be applied only to the training set to avoid leakage.

3. Use algorithm-level and cost-sensitive methods

Explain class weighting, cost-sensitive learning, or ensemble methods like balanced random forests that penalize minority-class errors more heavily. Highlight that these often outperform naive resampling.

4. Tune the decision threshold

Describe how to optimize the classification threshold using precision-recall curves rather than default 0.5, selecting the point that best balances the business costs identified in step 1.

5. Select and justify metrics

Argue why accuracy is misleading and recommend precision, recall, F1, and PR-AUC, explaining which metric to prioritize given the cost asymmetry (e.g., high precision to avoid false positives).

Key Points to Mention

  • Accuracy paradox: a naive model predicting all ham can achieve >99% accuracy but zero spam detection.
  • Precision-recall trade-off and the importance of PR-AUC over ROC-AUC for imbalanced data.
  • Cost-sensitive evaluation: false positive (legitimate email flagged) vs. false negative (spam delivered) have different business impacts.
  • Resampling techniques (SMOTE, oversampling, undersampling) and their pitfalls (overfitting, information loss, leakage).
  • Class weighting and threshold optimization as alternatives to resampling.
  • Stratified cross-validation and ensuring the test set reflects the real-world imbalance.

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

Q3

Compare Bag-of-Words and TF-IDF vectorization for this kind of task. When would you prefer one over the other?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Blanked for a second on a clean way to articulate the IDF weighting benefit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining both methods clearly, then compare them on dimensions like term weighting, handling of common words, and interpretability. Ground your answer in the context of a Disney ML task (e.g., text classification of movie reviews or content tagging) and explain when each would be preferred based on data characteristics and business needs.

Pro tip: Mention that TF-IDF often works better when rare terms are informative (e.g., character names, niche genres), but Bag-of-Words can be preferable for very small datasets or when absolute frequency matters (e.g., sentiment intensity). Also note that both ignore semantics, so for Disney's rich content, embeddings might be a next step.

1. Define both methods

Briefly explain Bag-of-Words (raw counts) and TF-IDF (weighted by inverse document frequency) in simple terms.

2. Compare on key dimensions

Contrast them on term weighting, handling of stop words/common terms, interpretability, and sensitivity to document length.

3. Relate to the task context

Discuss how the choice depends on the specific Disney task (e.g., sentiment analysis, genre classification) and data properties like corpus size and vocabulary.

4. State preference scenarios

Give concrete examples: prefer BoW when absolute frequencies matter or dataset is small; prefer TF-IDF when distinguishing informative rare terms is crucial.

5. Acknowledge limitations and next steps

Mention that both are bag-of-words models ignoring semantics and word order, and suggest embeddings or transformers for richer representation.

Key Points to Mention

  • Bag-of-Words uses raw term counts; TF-IDF downweights common terms and upweights rare, informative terms.
  • TF-IDF often improves performance in text classification when common words are less informative.
  • Bag-of-Words can be better for small datasets or when absolute frequency is meaningful (e.g., sentiment intensity).
  • Both ignore word order and semantics; consider embeddings for Disney's rich textual content.
  • Interpretability: BoW is straightforward; TF-IDF can highlight important terms but requires explaining IDF.
  • Data sparsity: TF-IDF can reduce the impact of frequent but uninformative words, leading to sparser representations.

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