np.dot()主要用于向量点积和矩阵乘法
发布时间
阅读量:
阅读量
当np.dot(a, b)中的a与b均为矩阵时,执行的操作即为矩阵乘法运算。此外,np.matmul(a, b)同样具备实现矩阵相乘的功能。
all_user_predicted_ratings = np.dot(np.dot(U, sigma), Vt)
test=np.matmul(np.matmul(U, sigma), Vt)
np.array_equal(test, all_user_predicted_ratings) # 判断两个array是否相同的⽅法

全部评论 (0)
还没有任何评论哟~
