PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Machine Learning/Boston Consulting Group

Train GradientBoostingClassifier with 5-Fold Cross-Validation

Last updated: Mar 29, 2026

Quick Overview

This interview question evaluates core ML concepts, assumptions, math intuition, training/evaluation trade-offs, and practical failure modes in a realistic interview setting. A strong answer for Train GradientBoostingClassifier with 5-Fold Cross-Validation states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

  • easy
  • Boston Consulting Group
  • Machine Learning
  • Data Scientist

Train GradientBoostingClassifier with 5-Fold Cross-Validation

Company: Boston Consulting Group

Role: Data Scientist

Category: Machine Learning

Difficulty: easy

Interview Round: Take-home Project

##### Scenario BCG CodeSignal notebook – final model training task ##### Question Train a GradientBoostingClassifier on the prepared data using 5-fold cross-validation, report mean ROC-AUC, and save the trained model to disk (model.pkl). Provide the full Python code. ##### Hints Pipeline ➜ cross_val_score ➜ joblib.dump.

Quick Answer: This interview question evaluates core ML concepts, assumptions, math intuition, training/evaluation trade-offs, and practical failure modes in a realistic interview setting. A strong answer for Train GradientBoostingClassifier with 5-Fold Cross-Validation states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

Related Interview Questions

  • Design and sample for credit default prediction - Boston Consulting Group (Medium)
  • Explain AUC, imbalance, losses, and networks - Boston Consulting Group (medium)
  • Build and evaluate imbalanced binary classifier - Boston Consulting Group (medium)
  • Reduce overfitting under constraints - Boston Consulting Group (hard)
  • Achieve 0.95 precision via thresholding - Boston Consulting Group (medium)
|Home/Machine Learning/Boston Consulting Group

Train GradientBoostingClassifier with 5-Fold Cross-Validation

Boston Consulting Group logo
Boston Consulting Group
Aug 4, 2025, 10:55 AM
easyData ScientistTake-home ProjectMachine Learning
4
0

Train GradientBoostingClassifier with 5-Fold Cross-Validation

Final Model Training: GradientBoostingClassifier with 5-Fold CV

Context

Assume the notebook already contains a prepared feature matrix X and a binary target y (0/1), with any necessary preprocessing completed. Your goal is to evaluate and train a final model.

Task

  1. Build a scikit-learn Pipeline that uses a GradientBoostingClassifier.
  2. Evaluate the model using 5-fold Stratified cross-validation and report the mean ROC-AUC.
  3. Fit the model on the full dataset (X, y).
  4. Save the trained pipeline to disk as model.pkl.

Deliverable

Provide the full Python code that performs all steps above.

Constraints & Assumptions

  • Preserve the scope, facts, inputs, and requested outputs from the prompt above.
  • If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
  • Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.

Clarifying Questions to Ask

  • Clarify the task, data shape, labels, constraints, and evaluation metric.
  • State assumptions behind the math or modeling technique you choose.
  • Connect theory to practical training, debugging, and deployment implications.

What a Strong Answer Covers

  • Correct definitions and formulas where the prompt requires them.
  • A practical explanation of how the method behaves on real data.
  • Trade-offs, failure modes, diagnostics, and mitigation strategies.
  • Evaluation choices that match the product or modeling objective.

Follow-up Questions

  • How would noisy labels, class imbalance, or distribution shift affect the answer?
  • What would you monitor after deployment?
  • Which baseline would you compare against first?
Loading comments...

Browse More Questions

More Machine Learning•More Boston Consulting Group•More Data Scientist•Boston Consulting Group Data Scientist•Boston Consulting Group Machine Learning•Data Scientist Machine Learning

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.