Skip to content

Commit c427ffa

Browse files
Update FM_train.py
1 parent 0311a17 commit c427ffa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Chapter_3 Factorization Machine/FM_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def stocGradAscent(dataMatrix, classLabels, k, max_iter, alpha):
8383
# 计算损失函数的值
8484
if it % 1000 == 0:
8585
print "\t------- iter: ", it, " , cost: ", \
86-
getCost(getPrediction(np.mat(dataTrain), w0, w, v), classLabels)
86+
getCost(getPrediction(np.mat(dataMatrix), w0, w, v), classLabels)
8787

8888
# 3、返回最终的FM模型的参数
8989
return w0, w, v

0 commit comments

Comments
 (0)