The goal of any machine learning problem is to find a single model that will best predict our wanted outcome. Rather than making one model and hoping this model is the best/most accurate predictor we can make, ensemble methods take a myriad of models into account, and average those models to produce one final model. It is important to note that Decision Trees are not the only form of ensemble methods, just the most popular and relevant in DataScience today.
Random Forest is an ensemble machine learning algorithm that follows the bagging technique. The base estimators in the random forest are decision trees. Random forest randomly selects a set of features that are used to decide the best split at each node of the decision tree. Looking at it step-by-step, this is what a random forest model does: 1. Random subsets are created from the original dataset (bootstrapping). 2. At each node in the decision tree, only a random set of features are considered to decide the best split. 3. A decision tree model is fitted on each of the subsets. 4. The final prediction is calculated by averaging the predictions from all decision trees. To sum up, the Random forest randomly selects data points and features and builds multiple trees (Forest). Random Forest is used for feature importance selection. The attribute (.feature_importances_) is used to find feature importance. Some Important Parameters:- 1. n_estimators: - It defines the number of decision tree...

Comments
Post a Comment