From the course: NLP with Python for Machine Learning Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Gradient-boosting grid search

Gradient-boosting grid search - Python Tutorial

From the course: NLP with Python for Machine Learning Essential Training

Start my 1-month free trial

Gradient-boosting grid search

- [Instructor] Now that we've been introduced to gradient boosting, we're going to go through some similar steps as we did for random forest. With that said, we are going to condense things a little bit and move a little bit faster. So, the concepts will be exactly the same as we went through with random forest, we'll just be exploring a new model. So again, we're going to read in and clean the data, and we're using tf-idf as the vectorizer. And then we're going to import our gradient boosting classifier from sklearn.ensemble, and then we can explore that classifier in the same way we have before, by looking at all the attributes and methods and then printing out the default settings for each of the hyperparameter settings. So, let's go ahead and run both of these cells. Now, for the attributes and methods, you can see that they're almost exactly the same as they are with random forest. So, you'll notice our fit, you'll notice our predict, you'll the feature importances. This is one…

Contents