{ "title": "Gradient Boosting Mastery: 100 MCQs", "description": "A complete 100-question set to master Gradient Boosting — covering boosting basics, weak learners, sequential correction, advanced hyperparameters, regularization, and real-world scenarios.", "questions": [ { "id": 1, "questionText": "What is the main idea behind Gradient Boosting?", "options": [ "Reduce dimensions before training", "Use only one deep decision tree", "Sequentially build models to correct errors of previous ones", "Combine models randomly" ], "correctAnswerIndex": 2, "explanation": "Gradient Boosting builds models sequentially, with each new model correcting the errors made by the previous ensemble." }, { "id": 2, "questionText": "Which type of learner is typically used in Gradient Boosting?", "options": [ "PCA components", "K-Means clusters", "Neural Networks", "Decision Trees" ], "correctAnswerIndex": 3, "explanation": "Gradient Boosting commonly uses shallow decision trees (weak learners) for sequential correction." }, { "id": 3, "questionText": "Scenario: You notice your Gradient Boosting model is underfitting. Which action could help?", "options": [ "Use fewer estimators", "Reduce dataset size", "Reduce learning rate", "Increase tree depth" ], "correctAnswerIndex": 3, "explanation": "Increasing tree depth allows each weak learner to capture more complex patterns, reducing underfitting." }, { "id": 4, "questionText": "What role does the learning rate play in Gradient Boosting?", "options": [ "Controls tree pruning only", "Controls the contribution of each tree to the ensemble", "Controls the number of features", "Controls the dataset size" ], "correctAnswerIndex": 1, "explanation": "Learning rate scales the contribution of each tree; lower values slow learning and improve generalization." }, { "id": 5, "questionText": "Scenario: Your Gradient Boosting model has perfect training accuracy but poor test accuracy. What is likely happening?", "options": [ "High bias", "Optimal fit", "Overfitting", "Underfitting" ], "correctAnswerIndex": 2, "explanation": "Perfect training accuracy with poor generalization indicates overfitting." }, { "id": 6, "questionText": "Which metric is commonly minimized by Gradient Boosting?", "options": [ "Confusion matrix values", "Accuracy", "Loss (cost) function", "F1-score" ], "correctAnswerIndex": 2, "explanation": "Gradient Boosting minimizes a differentiable loss function using gradient descent in function space." }, { "id": 7, "questionText": "Scenario: You want to speed up Gradient Boosting without losing much accuracy. Which technique helps?", "options": [ "Reduce number of trees to 1", "Use very deep trees", "Increase learning rate drastically", "Subsampling (stochastic gradient boosting)" ], "correctAnswerIndex": 3, "explanation": "Subsampling (training on a random subset per iteration) speeds up computation and can improve generalization." }, { "id": 8, "questionText": "What is the primary benefit of using weak learners in Gradient Boosting?", "options": [ "They achieve perfect predictions alone", "They reduce computation and allow sequential correction", "They perform clustering", "They reduce data dimensionality" ], "correctAnswerIndex": 1, "explanation": "Weak learners are simple models that improve performance when combined sequentially." }, { "id": 9, "questionText": "Scenario: Your Gradient Boosting model is sensitive to outliers. What is a common solution?", "options": [ "Reduce learning rate to zero", "Increase tree depth", "Use robust loss functions like Huber loss", "Use only one estimator" ], "correctAnswerIndex": 2, "explanation": "Robust loss functions reduce the influence of outliers on the model." }, { "id": 10, "questionText": "Which parameter controls the maximum number of trees in Gradient Boosting?", "options": [ "max_depth", "subsample", "learning_rate", "n_estimators" ], "correctAnswerIndex": 3, "explanation": "The n_estimators parameter specifies how many sequential trees are built in the ensemble." }, { "id": 11, "questionText": "Scenario: You increase the number of estimators but leave learning rate high. What is likely to happen?", "options": [ "Underfitting decreases", "Nothing significant", "Overfitting may increase", "Model accuracy drops immediately" ], "correctAnswerIndex": 2, "explanation": "A high learning rate with many trees can cause overfitting since each tree contributes too much." }, { "id": 12, "questionText": "What is the role of the residual in Gradient Boosting?", "options": [ "Represents feature importance", "Represents total variance", "Represents errors from previous models to be corrected", "Represents learning rate" ], "correctAnswerIndex": 2, "explanation": "Residuals are the differences between predicted and actual values; new trees aim to predict them." }, { "id": 13, "questionText": "Scenario: Training Gradient Boosting with very deep trees. Risk?", "options": [ "High bias", "Reduced training time", "Underfitting", "Overfitting" ], "correctAnswerIndex": 3, "explanation": "Very deep trees can overfit the training data and generalize poorly." }, { "id": 14, "questionText": "Which of the following is a key advantage of Gradient Boosting over single Decision Trees?", "options": [ "Higher predictive accuracy", "Handles missing data automatically", "No hyperparameters", "Less computation" ], "correctAnswerIndex": 0, "explanation": "By combining many weak learners sequentially, Gradient Boosting improves prediction accuracy compared to a single tree." }, { "id": 15, "questionText": "Scenario: You are using Gradient Boosting with imbalanced classes. Recommended approach?", "options": [ "Ignore the imbalance", "Increase learning rate", "Use class weights or specialized loss functions", "Reduce number of trees" ], "correctAnswerIndex": 2, "explanation": "Class weighting or modified loss functions helps Gradient Boosting handle class imbalance effectively." }, { "id": 16, "questionText": "Which of the following is NOT a common loss function for Gradient Boosting?", "options": [ "Deviance (logistic loss)", "Least squares regression", "Euclidean distance", "Huber loss" ], "correctAnswerIndex": 2, "explanation": "Euclidean distance is not used directly as a loss function; least squares, deviance, and Huber loss are standard choices." }, { "id": 17, "questionText": "Scenario: You reduce learning rate too much while keeping n_estimators small. Effect?", "options": [ "Overfitting", "Random predictions", "Immediate convergence", "Underfitting due to slow learning" ], "correctAnswerIndex": 3, "explanation": "A very low learning rate with few trees may prevent the model from fitting the data sufficiently, causing underfitting." }, { "id": 18, "questionText": "What is the difference between Gradient Boosting and AdaBoost?", "options": [ "They are identical", "Gradient Boosting optimizes a differentiable loss; AdaBoost adjusts weights on misclassified samples", "AdaBoost uses neural networks; Gradient Boosting uses trees", "Gradient Boosting is unsupervised" ], "correctAnswerIndex": 1, "explanation": "Gradient Boosting minimizes a loss function via gradients; AdaBoost focuses on weighting misclassified examples." }, { "id": 19, "questionText": "Scenario: You have noisy data. Which adjustment helps Gradient Boosting perform better?", "options": [ "Increase tree depth aggressively", "Lower learning rate and smaller tree depth", "Increase learning rate", "Reduce number of features" ], "correctAnswerIndex": 1, "explanation": "Lower learning rate and shallower trees prevent the model from fitting noise in the data." }, { "id": 20, "questionText": "Which parameter controls the randomness of rows sampled per tree?", "options": [ "learning_rate", "n_estimators", "max_depth", "subsample" ], "correctAnswerIndex": 3, "explanation": "The subsample parameter specifies the fraction of rows used per iteration, introducing randomness and helping generalization." }, { "id": 21, "questionText": "Scenario: Gradient Boosting is slow on a large dataset. Possible solution besides subsampling?", "options": [ "Add more trees", "Use deeper trees", "Increase learning rate drastically", "Reduce max_depth or min_samples_split" ], "correctAnswerIndex": 3, "explanation": "Shallower trees and stricter splitting criteria reduce computation per tree and speed up training." }, { "id": 22, "questionText": "What is the effect of increasing the number of estimators while keeping learning rate constant?", "options": [ "Reduced training time", "Learning rate becomes irrelevant", "Model may overfit if learning rate is high", "Underfitting" ], "correctAnswerIndex": 2, "explanation": "More estimators increase model capacity; with high learning rate, overfitting is more likely." }, { "id": 23, "questionText": "Scenario: You want to use Gradient Boosting for regression. Which loss function is typical?", "options": [ "Least squares (MSE)", "Log loss", "Cross-entropy", "Hinge loss" ], "correctAnswerIndex": 0, "explanation": "Mean squared error (least squares) is standard for regression tasks in Gradient Boosting." }, { "id": 24, "questionText": "Which technique helps Gradient Boosting handle high-dimensional datasets?", "options": [ "Using all features every time", "Increasing tree depth", "Feature subsampling per tree", "Reducing number of trees" ], "correctAnswerIndex": 2, "explanation": "Sampling a subset of features for each tree reduces overfitting and improves computation on high-dimensional data." }, { "id": 25, "questionText": "Scenario: You want faster convergence with Gradient Boosting without losing accuracy. Strategy?", "options": [ "Reduce tree depth to 1 always", "Increase learning rate drastically", "Lower learning rate slightly and increase n_estimators", "Use fewer features per tree only" ], "correctAnswerIndex": 2, "explanation": "A slightly lower learning rate combined with more estimators ensures stable, accurate learning while converging efficiently." }, { "id": 26, "questionText": "Scenario: Your Gradient Boosting model is still overfitting after tuning learning rate. Next step?", "options": [ "Use deeper trees", "Increase learning rate", "Reduce max_depth or min_samples_split", "Add more trees" ], "correctAnswerIndex": 2, "explanation": "Controlling tree complexity by reducing depth or increasing minimum samples per split helps prevent overfitting." }, { "id": 27, "questionText": "Which parameter limits the number of nodes in each tree?", "options": [ "n_estimators", "max_leaf_nodes", "learning_rate", "subsample" ], "correctAnswerIndex": 1, "explanation": "max_leaf_nodes controls the maximum number of terminal nodes in each tree, limiting complexity." }, { "id": 28, "questionText": "Scenario: You want to reduce variance without increasing bias in Gradient Boosting. Recommended action?", "options": [ "Use only one deep tree", "Increase n_estimators and reduce learning rate", "Reduce number of features", "Increase learning rate significantly" ], "correctAnswerIndex": 1, "explanation": "More trees with lower learning rate reduce variance while preserving bias." }, { "id": 29, "questionText": "What is the main difference between Stochastic Gradient Boosting and standard Gradient Boosting?", "options": [ "Using deeper trees", "Subsampling of training data per tree", "Only one estimator is used", "Faster learning rate" ], "correctAnswerIndex": 1, "explanation": "Stochastic Gradient Boosting trains each tree on a random subset of data, reducing variance and speeding training." }, { "id": 30, "questionText": "Scenario: You are applying Gradient Boosting to a dataset with missing values. What is a standard approach?", "options": [ "Use surrogate splits or imputation", "Remove all missing rows", "Use a single deep tree", "Ignore missing values" ], "correctAnswerIndex": 0, "explanation": "Gradient Boosting can handle missing data using surrogate splits or by imputing values before training." }, { "id": 31, "questionText": "Which metric can you monitor during Gradient Boosting training for early stopping?", "options": [ "Validation loss or error", "Training set size", "Tree depth", "Number of features" ], "correctAnswerIndex": 0, "explanation": "Monitoring validation loss allows early stopping to prevent overfitting while training." }, { "id": 32, "questionText": "Scenario: You reduce learning rate but training becomes very slow. What is a good solution?", "options": [ "Increase tree depth", "Stop training immediately", "Increase n_estimators to allow gradual learning", "Reduce dataset size drastically" ], "correctAnswerIndex": 2, "explanation": "A lower learning rate requires more trees (higher n_estimators) to fit the data effectively." }, { "id": 33, "questionText": "What is the effect of increasing max_depth too much in Gradient Boosting?", "options": [ "Reduction in variance", "Underfitting", "Faster convergence", "Overfitting" ], "correctAnswerIndex": 3, "explanation": "Deep trees can model complex patterns but are prone to overfitting." }, { "id": 34, "questionText": "Scenario: You use Gradient Boosting with very small n_estimators. Risk?", "options": [ "Subsampling fails", "Learning rate becomes too high", "Overfitting immediately", "Underfitting due to insufficient model capacity" ], "correctAnswerIndex": 3, "explanation": "Too few trees may prevent the model from capturing patterns in the data, leading to underfitting." }, { "id": 35, "questionText": "Which of the following can help Gradient Boosting handle categorical variables?", "options": [ "PCA", "Standard scaling only", "One-hot encoding or ordinal encoding", "Random subsampling" ], "correctAnswerIndex": 2, "explanation": "Encoding categorical features allows Gradient Boosting trees to split effectively on categorical values." }, { "id": 36, "questionText": "Scenario: Your model has slow convergence. Which combination is likely to improve it?", "options": [ "Reduce subsample rate to 0.1", "Decrease learning rate and reduce trees", "Increase learning rate slightly and add more trees", "Reduce tree depth drastically only" ], "correctAnswerIndex": 2, "explanation": "Slightly higher learning rate with more estimators can speed learning while maintaining accuracy." }, { "id": 37, "questionText": "What is a common technique to prevent Gradient Boosting from overfitting noisy data?", "options": [ "Remove subsampling", "Increase learning rate", "Increase tree depth", "Use shallow trees and lower learning rate" ], "correctAnswerIndex": 3, "explanation": "Shallow trees and lower learning rate reduce the model's tendency to fit noise." }, { "id": 38, "questionText": "Scenario: Using Gradient Boosting on imbalanced classes. Common adjustment?", "options": [ "Use custom loss function or class weights", "Increase learning rate", "Ignore class imbalance", "Reduce n_estimators" ], "correctAnswerIndex": 0, "explanation": "Weighted loss or custom loss functions help Gradient Boosting pay more attention to minority classes." }, { "id": 39, "questionText": "Which technique allows Gradient Boosting to reduce correlation between trees?", "options": [ "Using one tree only", "Reducing learning rate", "Increasing max_depth", "Subsampling data (stochastic boosting)" ], "correctAnswerIndex": 3, "explanation": "Randomly sampling data for each tree reduces correlation, improving ensemble diversity and generalization." }, { "id": 40, "questionText": "Scenario: You notice slow training with large n_estimators. Which option helps?", "options": [ "Increase learning rate drastically", "Increase number of features per tree", "Remove subsampling", "Reduce max_depth or min_samples_split" ], "correctAnswerIndex": 3, "explanation": "Simplifying trees reduces computation per estimator and speeds up training." }, { "id": 41, "questionText": "Gradient Boosting sequentially adds trees to minimize which quantity?", "options": [ "Feature variance", "Residual errors from previous trees", "Dataset size", "Learning rate" ], "correctAnswerIndex": 1, "explanation": "Each new tree predicts the residual errors of the ensemble built so far." }, { "id": 42, "questionText": "Scenario: Your model shows diminishing returns after many trees. Possible reason?", "options": [ "Learning rate is zero", "Dataset is too large", "Residuals become small and difficult to improve", "Trees are too shallow" ], "correctAnswerIndex": 2, "explanation": "As the ensemble improves, residuals shrink, limiting the benefit of additional trees." }, { "id": 43, "questionText": "Which variant of Gradient Boosting adapts to classification by optimizing logistic loss?", "options": [ "Decision Tree Regression", "Stochastic Gradient Boosting", "AdaBoost", "Logistic Gradient Boosting" ], "correctAnswerIndex": 3, "explanation": "Gradient Boosting can be adapted for classification by minimizing logistic loss." }, { "id": 44, "questionText": "Scenario: Training Gradient Boosting on large dataset with limited memory. Strategy?", "options": [ "Increase max_depth", "Increase learning rate", "Reduce subsample and feature fraction per tree", "Use full dataset each iteration" ], "correctAnswerIndex": 2, "explanation": "Subsampling rows and features reduces memory usage and speeds up training." }, { "id": 45, "questionText": "Which parameter controls how many features are used per tree in Gradient Boosting?", "options": [ "max_features", "max_depth", "n_estimators", "learning_rate" ], "correctAnswerIndex": 0, "explanation": "max_features specifies the number of features considered for each tree, introducing randomness and reducing overfitting." }, { "id": 46, "questionText": "Scenario: Your Gradient Boosting predictions are unstable. Likely cause?", "options": [ "Low subsample", "Shallow trees", "High learning rate or deep trees", "Too few features" ], "correctAnswerIndex": 2, "explanation": "High learning rate and deep trees can cause the model to be sensitive to small data variations." }, { "id": 47, "questionText": "Which type of problem is Gradient Boosting typically applied to?", "options": [ "Clustering only", "Dimensionality reduction", "Regression and classification", "Feature extraction only" ], "correctAnswerIndex": 2, "explanation": "Gradient Boosting is widely used for regression and classification tasks." }, { "id": 48, "questionText": "Scenario: You want to combine Gradient Boosting with Random Forests. Benefit?", "options": [ "Removes need for hyperparameter tuning", "Faster computation always", "Improved generalization by blending ensembles", "Reduces number of trees" ], "correctAnswerIndex": 2, "explanation": "Blending ensembles can improve generalization but may not always reduce computation." }, { "id": 49, "questionText": "What does the 'shrinkage' term refer to in Gradient Boosting?", "options": [ "Learning rate", "Tree depth", "Number of features", "Subsample fraction" ], "correctAnswerIndex": 0, "explanation": "Shrinkage is another term for the learning rate, controlling the contribution of each tree." }, { "id": 50, "questionText": "Scenario: You increase subsample fraction to 1.0. Effect?", "options": [ "Faster convergence always", "Reduces tree depth automatically", "Model underfits", "Less randomness, potentially higher overfitting" ], "correctAnswerIndex": 3, "explanation": "Using the full dataset per iteration removes randomness and may increase overfitting." }, { "id": 51, "questionText": "Scenario: Your Gradient Boosting model has high variance despite shallow trees. What could help?", "options": [ "Use all features for each tree", "Increase learning rate", "Increase tree depth", "Reduce learning rate or use subsampling" ], "correctAnswerIndex": 3, "explanation": "Reducing learning rate or using row/feature subsampling reduces variance and improves generalization." }, { "id": 52, "questionText": "Which regularization technique is commonly applied in Gradient Boosting?", "options": [ "Dropout", "Early stopping only", "L1/L2 penalties on leaf weights", "Batch normalization" ], "correctAnswerIndex": 2, "explanation": "Some implementations (like XGBoost) allow L1/L2 regularization on leaf weights to prevent overfitting." }, { "id": 53, "questionText": "Scenario: You want to reduce overfitting while keeping model complexity high. Best approach?", "options": [ "Increase max_depth only", "Lower learning rate and increase n_estimators", "Increase learning rate", "Reduce subsample fraction to 0.1" ], "correctAnswerIndex": 1, "explanation": "Lower learning rate with more trees allows high capacity without overfitting." }, { "id": 54, "questionText": "What is the role of min_samples_split in Gradient Boosting trees?", "options": [ "Learning rate", "Number of trees to build", "Maximum depth of tree", "Minimum number of samples required to split a node" ], "correctAnswerIndex": 3, "explanation": "min_samples_split controls the minimum samples needed to create a split, limiting overfitting." }, { "id": 55, "questionText": "Scenario: You notice training is slow with very large n_estimators. Recommended action?", "options": [ "Add more features", "Reduce number of trees", "Reduce max_depth or min_samples_split", "Increase learning rate drastically" ], "correctAnswerIndex": 2, "explanation": "Simplifying trees reduces computation per estimator, speeding up training." }, { "id": 56, "questionText": "Which loss function is commonly used for binary classification in Gradient Boosting?", "options": [ "Mean squared error", "Euclidean distance", "Logistic loss (deviance)", "Huber loss" ], "correctAnswerIndex": 2, "explanation": "Logistic loss is used to optimize Gradient Boosting for binary classification tasks." }, { "id": 57, "questionText": "Scenario: You increase max_features to all features. Possible outcome?", "options": [ "Higher risk of overfitting", "Less accurate predictions", "Faster training", "Reduced model capacity" ], "correctAnswerIndex": 0, "explanation": "Using all features reduces randomness, which can increase overfitting." }, { "id": 58, "questionText": "Which parameter controls the minimum number of samples in a leaf node?", "options": [ "min_samples_leaf", "max_depth", "learning_rate", "n_estimators" ], "correctAnswerIndex": 0, "explanation": "min_samples_leaf prevents nodes with very few samples, reducing overfitting." }, { "id": 59, "questionText": "Scenario: Your Gradient Boosting model struggles with high-dimensional sparse data. What helps?", "options": [ "Increase learning rate", "Use fewer estimators", "Increase tree depth", "Feature subsampling per tree" ], "correctAnswerIndex": 3, "explanation": "Subsampling features reduces complexity and improves generalization in high-dimensional sparse datasets." }, { "id": 60, "questionText": "Which term describes sequentially fitting models to residual errors in Gradient Boosting?", "options": [ "Feature scaling", "Bagging", "Random subsampling", "Gradient descent in function space" ], "correctAnswerIndex": 3, "explanation": "Gradient Boosting performs gradient descent in function space by fitting new models to residuals." }, { "id": 61, "questionText": "Scenario: You want Gradient Boosting to converge faster without overfitting. Strategy?", "options": [ "Use fewer trees only", "Reduce max_depth to 1", "Slightly increase learning rate and add more trees", "Use very high learning rate" ], "correctAnswerIndex": 2, "explanation": "Slightly higher learning rate with more estimators balances convergence speed and generalization." }, { "id": 62, "questionText": "What does the subsample parameter control in stochastic Gradient Boosting?", "options": [ "Learning rate", "Number of features per split", "Maximum depth", "Fraction of rows used per tree" ], "correctAnswerIndex": 3, "explanation": "Subsample fraction determines how many training rows are randomly selected per iteration, introducing randomness." }, { "id": 63, "questionText": "Scenario: You use Gradient Boosting for multiclass classification. Key adjustment?", "options": [ "Use one-vs-rest or softmax loss", "Use mean squared error", "Use only one estimator", "Reduce tree depth to 1" ], "correctAnswerIndex": 0, "explanation": "Multiclass problems require suitable loss functions or strategies like one-vs-rest or softmax." }, { "id": 64, "questionText": "Which regularization parameter in XGBoost controls L2 penalty on leaf weights?", "options": [ "gamma", "lambda", "alpha", "subsample" ], "correctAnswerIndex": 1, "explanation": "Lambda applies L2 regularization to leaf weights, helping reduce overfitting." }, { "id": 65, "questionText": "Scenario: You want to prevent Gradient Boosting from fitting noise in small datasets. Recommended?", "options": [ "Increase learning rate", "Use all features per tree", "Increase max_depth drastically", "Lower learning rate and use shallow trees" ], "correctAnswerIndex": 3, "explanation": "Lower learning rate and shallow trees reduce overfitting to noise." }, { "id": 66, "questionText": "What is the effect of early stopping in Gradient Boosting?", "options": [ "Increases learning rate", "Removes subsampling", "Stops training when validation loss stops improving", "Reduces tree depth automatically" ], "correctAnswerIndex": 2, "explanation": "Early stopping prevents overfitting by halting training once performance on validation data plateaus." }, { "id": 67, "questionText": "Scenario: You increase n_estimators and lower learning rate. Expected effect?", "options": [ "Better generalization and lower bias", "Overfitting immediately", "Faster training only", "Model underfits always" ], "correctAnswerIndex": 0, "explanation": "More trees with smaller learning rate improves generalization while reducing bias." }, { "id": 68, "questionText": "Which Gradient Boosting variant uses row and feature subsampling?", "options": [ "AdaBoost", "Bagging", "Standard Gradient Boosting", "Stochastic Gradient Boosting" ], "correctAnswerIndex": 3, "explanation": "Stochastic Gradient Boosting introduces randomness by subsampling rows and/or features per tree." }, { "id": 69, "questionText": "Scenario: Your Gradient Boosting model predicts extreme values for outliers. Solution?", "options": [ "Increase tree depth", "Increase learning rate", "Remove subsampling", "Use robust loss function like Huber loss" ], "correctAnswerIndex": 3, "explanation": "Robust loss functions reduce sensitivity to outliers." }, { "id": 70, "questionText": "What does gamma (min_split_loss) control in XGBoost?", "options": [ "Maximum depth", "Number of estimators", "Learning rate", "Minimum loss reduction required to make a split" ], "correctAnswerIndex": 3, "explanation": "Gamma prevents unnecessary splits by requiring a minimum loss reduction for a node to split." }, { "id": 71, "questionText": "Scenario: Using Gradient Boosting for regression. Best practice?", "options": [ "Increase tree depth aggressively", "Use only one deep tree", "Ignore validation set", "Monitor validation loss and adjust learning rate/n_estimators" ], "correctAnswerIndex": 3, "explanation": "Monitoring validation loss ensures good generalization and proper parameter tuning." }, { "id": 72, "questionText": "Which technique can reduce Gradient Boosting training time on large datasets?", "options": [ "Increase learning rate drastically", "Add more estimators", "Use more features per tree", "Subsample rows and features, limit tree depth" ], "correctAnswerIndex": 3, "explanation": "Row/feature subsampling and shallow trees reduce computation and memory usage." }, { "id": 73, "questionText": "Scenario: Gradient Boosting produces unstable predictions. Likely cause?", "options": [ "Shallow trees", "Low subsample fraction", "High learning rate or deep trees", "Low n_estimators" ], "correctAnswerIndex": 2, "explanation": "High learning rate and very deep trees can make predictions sensitive to small variations in data." }, { "id": 74, "questionText": "Which ensemble technique is Gradient Boosting based on?", "options": [ "Boosting", "Voting", "Stacking", "Bagging" ], "correctAnswerIndex": 0, "explanation": "Gradient Boosting is a boosting technique, sequentially correcting errors of weak learners." }, { "id": 75, "questionText": "Scenario: You want Gradient Boosting to generalize better on small dataset. Effective approach?", "options": [ "Increase max_depth only", "Use all features per tree without subsampling", "Lower learning rate, reduce tree depth, use subsampling", "Increase learning rate drastically" ], "correctAnswerIndex": 2, "explanation": "Reducing learning rate, limiting tree depth, and using subsampling helps prevent overfitting on small datasets." }, { "id": 76, "questionText": "Scenario: Gradient Boosting predictions fluctuate between runs. Likely cause?", "options": [ "Shallow trees", "Early stopping", "High learning rate or no subsampling", "Too few features" ], "correctAnswerIndex": 2, "explanation": "High learning rate and lack of subsampling can make predictions unstable across different runs." }, { "id": 77, "questionText": "Which parameter can help prevent Gradient Boosting from creating overly complex trees?", "options": [ "max_depth", "learning_rate", "subsample", "n_estimators" ], "correctAnswerIndex": 0, "explanation": "max_depth limits the maximum depth of individual trees, controlling complexity." }, { "id": 78, "questionText": "Scenario: Model overfits training data despite tuning learning rate and n_estimators. Additional fix?", "options": [ "Reduce max_depth or increase min_samples_leaf", "Increase learning rate", "Increase max_features to all", "Use fewer trees" ], "correctAnswerIndex": 0, "explanation": "Controlling tree complexity with max_depth or min_samples_leaf helps reduce overfitting." }, { "id": 79, "questionText": "Which variant of Gradient Boosting introduces randomness by subsampling both rows and features?", "options": [ "Bagging", "AdaBoost", "Standard Gradient Boosting", "Stochastic Gradient Boosting" ], "correctAnswerIndex": 3, "explanation": "Stochastic Gradient Boosting uses row and feature subsampling per tree to improve generalization." }, { "id": 80, "questionText": "Scenario: Using Gradient Boosting with noisy data. Best practice?", "options": [ "Lower learning rate, shallow trees, possibly subsample rows", "Increase learning rate", "Use all features per tree", "Use very deep trees" ], "correctAnswerIndex": 0, "explanation": "Shallow trees, lower learning rate, and subsampling reduce overfitting to noise." }, { "id": 81, "questionText": "What does min_samples_split control in Gradient Boosting?", "options": [ "Number of estimators", "Maximum depth of trees", "Learning rate", "Minimum samples required to split a node" ], "correctAnswerIndex": 3, "explanation": "min_samples_split prevents splitting nodes with very few samples, helping reduce overfitting." }, { "id": 82, "questionText": "Scenario: Validation loss increases after several iterations. Solution?", "options": [ "Apply early stopping", "Use deeper trees", "Add more trees regardless", "Increase learning rate" ], "correctAnswerIndex": 0, "explanation": "Early stopping halts training when validation loss stops improving to prevent overfitting." }, { "id": 83, "questionText": "Which parameter scales the contribution of each tree in Gradient Boosting?", "options": [ "max_depth", "subsample", "learning_rate (shrinkage)", "n_estimators" ], "correctAnswerIndex": 2, "explanation": "The learning_rate (shrinkage) controls how much each tree contributes to the ensemble." }, { "id": 84, "questionText": "Scenario: Model is slow on large dataset. Best strategies?", "options": [ "Increase learning rate drastically", "Use more features per tree", "Reduce max_depth, min_samples_split, or use subsampling", "Reduce learning rate to zero" ], "correctAnswerIndex": 2, "explanation": "Simplifying trees and using subsampling reduces computation and memory usage." }, { "id": 85, "questionText": "Which loss function is used for multi-class classification in Gradient Boosting?", "options": [ "Mean squared error", "Softmax / multinomial deviance", "Huber loss", "Binary cross-entropy" ], "correctAnswerIndex": 1, "explanation": "Softmax or multinomial deviance loss is used for multi-class classification problems." }, { "id": 86, "questionText": "Scenario: Gradient Boosting underfits. What adjustment helps?", "options": [ "Use fewer features", "Increase tree depth or n_estimators", "Apply early stopping immediately", "Reduce learning rate drastically" ], "correctAnswerIndex": 1, "explanation": "Increasing tree depth or number of estimators allows the model to better fit the data." }, { "id": 87, "questionText": "Which regularization parameter in XGBoost applies L1 penalty on leaf weights?", "options": [ "gamma", "lambda", "subsample", "alpha" ], "correctAnswerIndex": 3, "explanation": "Alpha applies L1 regularization to leaf weights, helping prevent overfitting." }, { "id": 88, "questionText": "Scenario: Learning rate is low and n_estimators are small. Risk?", "options": [ "Noise sensitivity", "Overfitting", "Random predictions", "Underfitting" ], "correctAnswerIndex": 3, "explanation": "Low learning rate with few trees prevents the model from fitting patterns, leading to underfitting." }, { "id": 89, "questionText": "Scenario: You increase subsample to 1.0. Effect?", "options": [ "Less randomness and higher risk of overfitting", "Faster convergence", "Underfitting", "Reduced tree depth" ], "correctAnswerIndex": 0, "explanation": "Using all data removes randomness and can increase overfitting." }, { "id": 90, "questionText": "Which technique reduces correlation among Gradient Boosting trees?", "options": [ "Increasing max_depth", "Increasing learning rate", "Row and feature subsampling", "Using single tree" ], "correctAnswerIndex": 2, "explanation": "Random sampling of rows and features reduces correlation between trees and improves generalization." }, { "id": 91, "questionText": "Scenario: Validation performance plateaus before n_estimators. Recommended?", "options": [ "Increase learning rate drastically", "Add more features", "Use early stopping", "Increase max_depth" ], "correctAnswerIndex": 2, "explanation": "Early stopping halts training when validation performance stops improving to avoid overfitting." }, { "id": 92, "questionText": "Scenario: Predictions are too sensitive to outliers. Solution?", "options": [ "Reduce n_estimators", "Increase learning rate", "Use deeper trees", "Use robust loss function like Huber loss" ], "correctAnswerIndex": 3, "explanation": "Robust loss functions reduce sensitivity to extreme values." }, { "id": 93, "questionText": "Which Gradient Boosting implementation allows L1/L2 regularization and parallelization?", "options": [ "AdaBoost", "XGBoost", "Bagging", "Scikit-learn GradientBoosting" ], "correctAnswerIndex": 1, "explanation": "XGBoost supports advanced regularization and parallel computation." }, { "id": 94, "questionText": "Scenario: You want Gradient Boosting to generalize on high-dimensional sparse data. Approach?", "options": [ "Increase tree depth", "Use all rows always", "Increase learning rate", "Subsample features per tree" ], "correctAnswerIndex": 3, "explanation": "Feature subsampling reduces complexity and overfitting in sparse, high-dimensional data." }, { "id": 95, "questionText": "Scenario: Model predicts extreme residuals for outliers. Solution?", "options": [ "Increase max_depth", "Reduce subsample", "Use robust loss function", "Increase learning rate" ], "correctAnswerIndex": 2, "explanation": "Robust loss functions like Huber loss reduce influence of outliers." }, { "id": 96, "questionText": "Which parameter controls minimum loss reduction required to make a split in XGBoost?", "options": [ "gamma (min_split_loss)", "alpha", "lambda", "subsample" ], "correctAnswerIndex": 0, "explanation": "Gamma prevents splits that do not improve the loss function sufficiently." }, { "id": 97, "questionText": "Scenario: Small dataset shows overfitting. Strategy?", "options": [ "Use all features per tree", "Increase learning rate", "Increase max_depth", "Reduce learning rate, shallow trees, use subsampling" ], "correctAnswerIndex": 3, "explanation": "Lower learning rate, shallow trees, and subsampling help prevent overfitting on small datasets." }, { "id": 98, "questionText": "Which ensemble method is Gradient Boosting part of?", "options": [ "Stacking", "Bagging", "Voting", "Boosting" ], "correctAnswerIndex": 3, "explanation": "Gradient Boosting is a boosting method, combining weak learners sequentially to reduce error." }, { "id": 99, "questionText": "Scenario: High variance despite using shallow trees and low learning rate. Possible fix?", "options": [ "Increase tree depth", "Increase subsample fraction and feature randomness", "Increase learning rate", "Reduce number of estimators" ], "correctAnswerIndex": 1, "explanation": "Subsampling rows and features introduces randomness and reduces variance." }, { "id": 100, "questionText": "Scenario: You need Gradient Boosting to handle multiclass classification efficiently. Best approach?", "options": [ "Use mean squared error", "Ignore class differences", "Use softmax/multinomial loss with suitable n_estimators and learning rate", "Use a single tree per class" ], "correctAnswerIndex": 2, "explanation": "Softmax/multinomial loss allows proper multiclass classification with Gradient Boosting." } ] }