具有一个预测变量的回归模型中拟合值的标准误为:
具有多个预测变量的回归模型中拟合值的标准误为:
对于加权回归,在公式中包括权重矩阵:
当数据具有测试数据集或 K 折交叉验证时,公式相同。的值
s2 是从培训数据。设计矩阵和重量矩阵也来自训练数据。
表示法 项说明s2mean
square error nnumber of
observations x0new
value of the predictormean of the predictor xii(序号) predictor value
x0 vector of values
that produce the fitted values, one for each column in the design matrix,
beginning with a 1 for the constant termx0transpose of the new vector of predictor
valuesXdesign matrix
Wweight matrix