We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在纸质版图书第85页,这里计算训练集的损失函数为 train_rmse = np.sqrt(train_rmse / len(user_train)) 我认为在每一批次中已经计算过当前批次的平均值,并进行累加 train_rmse += np.mean(errs ** 2) 所以这里应该修改为除以批次的数量 train_rmse = np.sqrt(train_rmse / batch_num) 并且86页的运行结果图也应该修改,我的运行结果如下
train_rmse = np.sqrt(train_rmse / len(user_train))
train_rmse += np.mean(errs ** 2)
train_rmse = np.sqrt(train_rmse / batch_num)
此外,我对训练集的RMSE进行重新计算
y_train_pred = model.pred(user_train, item_train) train_rmse = np.sqrt(np.mean((y_train - y_train_pred) ** 2)) print(f'训练集RMSE:{train_rmse:.4f}')
运行结果为: 训练集RMSE:0.9608
训练集RMSE:0.9608
所以我认为此处应当是出现了错误。
The text was updated successfully, but these errors were encountered:
伯禹在线版图书中也发现了此问题:https://hml.boyuai.com/books/chapter7
Sorry, something went wrong.
No branches or pull requests
在纸质版图书第85页,这里计算训练集的损失函数为
train_rmse = np.sqrt(train_rmse / len(user_train))
我认为在每一批次中已经计算过当前批次的平均值,并进行累加
train_rmse += np.mean(errs ** 2)
所以这里应该修改为除以批次的数量
train_rmse = np.sqrt(train_rmse / batch_num)
并且86页的运行结果图也应该修改,我的运行结果如下
此外,我对训练集的RMSE进行重新计算
运行结果为:
训练集RMSE:0.9608
所以我认为此处应当是出现了错误。
The text was updated successfully, but these errors were encountered: