まとめ
- MBE measures the average difference between predicted and actual values, indicating bias direction and magnitude.
- Using a power generation forecast example, we compute MBE to visualize under- or overestimation trends.
- Combined with MAE or RMSE, it helps distinguish bias from general prediction accuracy.
1. Definition #
$$ \mathrm{MBE} = \frac{1}{n} \sum_{i=1}^n (\hat{y}_i - y_i) $$
- Positive MBE: the model overestimates on average.
- Negative MBE: the model underestimates on average.
- MBE ≈ 0: under- and over-predictions are balanced.
2. Computing in Python #
import numpy as np
def mbe(y_true: np.ndarray, y_pred: np.ndarray) -> float:
"""Mean Bias Error (MBE)."""
return float(np.mean(y_pred - y_true))
print(f"MBE: {mbe(y_test, y_pred):.3f}")
MBE is easy to implement—it’s simply the mean difference.
Its unit is the same as the target variable.
3. Interpretation Tips #
- A near-zero MBE with large MAE means that positive and negative errors cancel out, even if the model is inaccurate.
- A strongly biased MBE indicates systematic under- or overestimation; bias correction may be needed.
- Also known as Mean Error (ME), it’s widely used in meteorology and energy forecasting.
4. Practical Applications #
- Demand forecasting: A negative MBE implies consistent underestimation, increasing stock-out risk. Use as input for correction factors.
- Energy load prediction: Detect systematic drift in generation or demand forecasts to trigger retraining or feature revision.
- Model comparison: Between models with similar MAE, prefer the one with smaller MBE for lower bias.
5. Comparison with Other Metrics #
| Metric | Role | Complementarity |
|---|---|---|
| MAE / RMSE | Measures average error magnitude | Combine with MBE to assess both accuracy and bias |
| MAPE / WAPE | Measures percentage error | Does not indicate direction of bias |
| MBE | Measures bias sign and magnitude | Identifies under- or overestimation tendencies |
Summary #
- MBE is a simple metric to quantify systematic prediction bias.
- Use alongside MAE or RMSE to analyze both bias and accuracy.
- In business contexts, it’s intuitive — e.g., “on average +3 liters overpredicted” — making it easy to communicate with stakeholders.