Skip to content
C

Problem 3: Compare Gradient Boosting with Different n_estimators

Easypython

Problem Description

Write a Python program that trains GradientBoostingClassifier models with n_estimators set to 10, 50, and 100, comparing their training accuracy to observe the effect of adding more boosting rounds.

Input

A labeled dataset.

Output

Training accuracy for each configuration.

Constraints

  • At least 10 labeled examples.

Example Input

text
(A labeled dataset with 10+ examples)

Example Output

text
n_estimators=10: Train accuracy = 0.90 n_estimators=50: Train accuracy = 0.98 n_estimators=100: Train accuracy = 1.00

Concepts Covered

GradientBoostingClassifier, n_estimators, training accuracy.

Input (stdin)

Output

Run your code to see output here...