While working on exploring a data set you might all definitely need to visualize the different features and for that you will import matplotlib. But while importing matplotlib we sometimes happen to write either %matplotlib inline or %matplotlib notebook in our Jupyter notebook. Let us understand what they do. %matplotlib %matplotlib is one of the magic functions you can use in Jupyter notebook. The magic functions can be used to add some dynamic capabilities to the outputs we get, as in general the output of these plots look more like reports. Writing the above magic function sets up necessary background features for python to work with matplotlib. %matplotlib inline %matplotlib inline is used to display the plots inline and on the next cell below the code which outputs the plot. It is used to store the plots in the notebook itself. So if the next time after saving the work done in the notebook, if you again wish to see the visualizations, it will still be available in the notebook
Gradient Boosting is one of the Boosting Ensemble methods that has been used a lot lately in both regression and classification problems. As the heading suggests we are going to understand Gradient Boosting in classification. But first, let's have a brief introduction to what are ensemble methods. Ensemble Methods Ensemble methods are used in machine learning to create a better and more optimized model and it can do so by learning from other models. Ensemble method uses a sample of models with their results and combines them together to get a more optimized result and therefore it doesn't have to depend on a single predictive model. One of the ways to perform ensemble technique in a classification problem is to use Gradient Boosting Classifier. Gradient Boosting in classification In Gradient Boosting we have multiple decision trees and we use the individual tree to gather their predictions and then combine it with the next decision tree we build. Let's understand the workin