Day 18 - Advanced Ensemble techniques - Stacking
Advanced Ensemble techniques
Here are the advanced methods in Ensemble techniques:
1. Stacking
This technique uses prediction from different models (eg. Decision tree, SVM, KNN, etc.) to form a new model. This model is used for making predictions on the test set. The concept used here is that each model can learn different parts of the problem but not the whole problem.
Steps:
- We split the training data into K-folds like in cross-validation.
- A base model is fitted on the K-1 parts and predictions are made for Kth part.
- We do this for each part of the training data.
- The base model is then fitted on the whole train data set to calculate its performance on the test set.
- We repeat the last 3 steps for other base models.
- Predictions from the train set are used as features for the second-level model.
- Second level model is used to make a prediction on the test set.
Comments
Post a Comment