"validation set" 是什么,为什么是 0,我尝试编写 RMS 的公式,但出现错误 "ZeroDivisionError"

What is "validation set" and why is 0 and I try to write the formula for RMS and I get the error "ZeroDivisionError"

rms=np.sqrt(np.mean(np.power((np.array(有效['price'])-preds),2)))

print('\n 验证集上的 RMSE 值:')

打印(有效值)

ZeroDividedError

设置验证集 (0,232)

数据集如下图所示 dataset

您的 "mean" 参数大小为零,请检查数组形状。