Notes

Soft Voting

When you ask several models to “vote” on a class label, you get a simple ensemble. Soft voting is the version that listens not just to each model’s final choice, but to how confident it is about every class.

What soft voting does

In a classification ensemble, each base model outputs a probability distribution over classes (for binary classification, a single probability like P(y=1)). Soft voting combines these probabilities—typically by averaging them (optionally with weights)—and then predicts the class with the highest combined probability. If models are weighted, the ensemble probability for class k is:

P_ens(k) = (Σ w_i * P_i(k)) / (Σ w_i)

This differs from hard voting, which only counts predicted labels and ignores confidence.

Why it matters in practice

Soft voting is valuable because confidence carries information. A model that is “barely” choosing class A shouldn’t count the same as a model that is strongly confident in A. Soft voting also produces smoother, better-calibrated decision-making when probabilities are meaningful—especially when you tune thresholds (e.g., flag fraud only if P(fraud) > 0.9).

Concrete examples and tooling

  • Spam detection: combine a linear model (good with word counts) and a tree model (good with nonlinear patterns) by averaging their spam probabilities.
  • Credit risk: weight a conservative logistic regression higher than a more aggressive gradient boosting model to reduce false approvals.
  • Disease screening: average probabilities from models trained on different feature sets (labs vs. demographics) to get a more stable risk score.

In scikit-learn, this is built into VotingClassifier with voting="soft", and it requires base estimators that implement predict_proba.

Soft Voting is an ensemble classification method that combines multiple models by averaging their predicted class probabilities (optionally with weights) and selecting the class with the highest aggregated probability. Unlike hard voting, it uses confidence information rather than only predicted labels. It matters because it can improve accuracy and calibration when base models produce reliable probability estimates, and it provides a principled way to trade off models via weighting.

Imagine you ask three friends where to eat. One says “pizza” but sounds unsure, another says “sushi” with high confidence, and the third is mildly in favor of sushi. You wouldn’t just count votes; you’d weigh how confident each friend is. That’s the idea behind Soft Voting.

In AI, several different models each give not only a predicted class (like “spam” vs “not spam”), but also a confidence score for each option. Soft Voting combines those confidence scores—often by averaging them—and picks the class with the strongest overall support. It’s a simple way to get a more reliable decision than trusting one model alone.