Gradient Boosting Python Code