Adding Hard and Soft voting options for dynamic ensemble selection (DES) models (Fixes #133). This PR also fixes the inconsistency in the implementations of predict and predict_proba functions which were using hard and soft voting respectively and could lead to different results.
New implementation allows users to select the voting type by setting the voting argument.
Hard voting ('hard'): only the predicted class matters, the support for each given class is not taken into account. Probabilities (predict_proba) in this case are estimated by the number of votes per class divided by the total number of votes.
Soft voting ('soft'): uses the argmax of the sums of the predicted probabilities for prediction. Probabilities are obtained by collecting the average of predicted probabilities instead of the argmax.
Soft voting requires that each base model can estimate probabilities (implements the predict_proba function). Each base model should be well-calibrated for better performance.
Adding Hard and Soft voting options for dynamic ensemble selection (DES) models (Fixes #133). This PR also fixes the inconsistency in the implementations of predict and predict_proba functions which were using hard and soft voting respectively and could lead to different results.
New implementation allows users to select the voting type by setting the
voting
argument.Hard voting ('hard'): only the predicted class matters, the support for each given class is not taken into account. Probabilities (predict_proba) in this case are estimated by the number of votes per class divided by the total number of votes.
Soft voting ('soft'): uses the argmax of the sums of the predicted probabilities for prediction. Probabilities are obtained by collecting the average of predicted probabilities instead of the argmax.
Soft voting requires that each base model can estimate probabilities (implements the predict_proba function). Each base model should be well-calibrated for better performance.