apachecn/hands-on-ml-zh

发现 第2章 一个完整的机器学习项目中的一个小错误

bianximo opened this issue · 0 comments

在“在训练集上训练和评估”一步中

from sklearn.metrics import mean_squared_error
housing_predictions = lin_reg.predict(housing_prepared)
lin_mse = mean_squared_error(some_labels, housing_predictions)
lin_rmse = np.sqrt(lin_mse)
lin_rmse
68628.413493824875
some_labels应该是housing_labels