Prompt 1: A decision tree is used for both classification and regression. Sometimes, to improve classification accuracy and avoid overfitting, a combination of decision tree models can be used instead of a single decision tree model.
Prompt 2: The concept of using several decision tree models for a classification or regression task is known as random forest. In at least two paragraphs, explain in your own words how random forest works.
Working of Random Forest
Random forest is a supervised learning algorithm that can be used for both classification and regression.In Random forest a number of trees are made from various subset of the dataset availaible.When we have to do any prediction then the average of all the prediction made by all the trees is taken and the majority prediction given by all the tree is taken as final prediction.As the number of trees increase the performance of the random forest is also increases.
STEPS IN RANDOM FOREST.
1)Select subset of the dataset from the training data.
2)Build decision tree from the selected dataset
3)choose value for N .i.e. how many trees we want to build
4) Repeat step 1 and step 2
5)for new data point.Make prediction with all the trees made and the cateogory which is predicted in majority is
considered as the final prediction.
Get Answers For Free
Most questions answered within 1 hours.