I have 3 models I trained and I want to ensemble them together in hope of getting better results.
What is the best way of doing that:
- Taking the softmaxes of each model and do averege
- Taking the softmaxes and concatenating them and feeding it into Xgboost
- Taking the last Linear output (not softmaxes) and feeding it into Xgboost
- Other ways I don’t know about
Thanks in advance!
How did you train the models? Did you train them on the exact same dataset or random subsets? With same or different hyperparameters?
Each model is trained on the exact same dataset not random subsets and with the same hyperparameters the only difference is maybe the learning rate.
I would recommend to retrain them in different subsets and then do a simple majority vote for classification (if you have one-hot coded outputs and else you can average over your predictions) and average over your predictions for regression.
Some approaches use the validation set to learn some weights which are multiplied to each output before summing them up.
People often use first way as simple. But I guess the second way may better. Have you try the second way