PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Machine Learning/Boston Consulting Group

Train GradientBoostingClassifier with 5-Fold Cross-Validation

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency in supervised machine learning model development and evaluation, including use of scikit-learn pipelines, GradientBoostingClassifier configuration, stratified 5-fold cross-validation, ROC-AUC performance measurement, and model serialization.

  • 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 question evaluates proficiency in supervised machine learning model development and evaluation, including use of scikit-learn pipelines, GradientBoostingClassifier configuration, stratified 5-fold cross-validation, ROC-AUC performance measurement, and model serialization.

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)
Boston Consulting Group logo
Boston Consulting Group
Aug 4, 2025, 10:55 AM
Data Scientist
Take-home Project
Machine Learning
2
0

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.

Solution

Show

Comments (0)

Sign in to leave a comment

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
PracHub

Master your tech interviews with 7,500+ 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
  • Compare Platforms
  • Discord Community

Support

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

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.