competitors.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:AND4NMF 作者: PrincetonML 项目源码 文件源码
def decoding(self):
        D = self.A_true.shape[1]
        num_doc = self.Y.shape[1]
        Z = np.asmatrix(np.zeros((D, num_doc)))
        A = np.asarray(self.A.copy())
        Y = np.asarray(self.Y.copy())
        for i in range(num_doc):
            Yi = np.array(Y[:, i]).flatten()
            t, bla = nnls(A, Yi)
            Z[:, i] = np.asmatrix(t).transpose()
        Z = np.asmatrix(Z)
        return Z
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号