Skip to content

kernel NMF (KMNF) works only on square matrices #2

@esysss

Description

@esysss

X = np.random.rand(10,11)
a = KNMF(X,rank = 4)
a.compute_factors(param = 0.5)

Traceback (most recent call last):
File "/home/esysss/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3398, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in <cell line: 1>
a.compute_factors(param = 0.5)
File "/home/esysss/.local/lib/python3.8/site-packages/libnmf/knmf.py", line 62, in compute_factors
self.update_w(A)
File "/home/esysss/.local/lib/python3.8/site-packages/libnmf/knmf.py", line 78, in update_w
AH = A.dot(self.H.T)
ValueError: shapes (10,10) and (11,4) not aligned: 10 (dim 1) != 11 (dim 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions