How can a regression score below zero on R²?
R² compares squared residuals with the squared spread around the observed target mean. On nonconstant targets, always predicting that mean scores zero.
r2_score in practice
Demand predictions can score below zero if they miss by more than a constant equal to that store’s observed mean. Different demand variability complicates store-to-store comparisons.
中文
测试集 R² 为什么可能是负数?
R² 将残差平方和与围绕真实目标均值的平方和比较。在非常数目标上,预测均值的基线得零分。
r2_score 应用实例
如果新门店的需求预测比该门店样本均值猜得还差,R² 可能为负。跨门店比较时也要看目标本身的波动。