pytorch-NMF icon indicating copy to clipboard operation
pytorch-NMF copied to clipboard

Constantly getting arrays full of NaN when using NMF

Open chadD123321 opened this issue 4 years ago • 2 comments

I am attempting to utilize nmf on video data. it is 3 dimensional but I have also collapsed it to 2 dimensions in hopes that would work(with appropriate NMF3D and NMF2D utilization). regardless of input shape, I try to use the fit_transform function and my returned V matrix is comprised of only NaN's . I imagine I am incorrectly training or fitting the data but any insight would be appreciated.

chadD123321 avatar Jan 28 '21 19:01 chadD123321

Have you tried adjusting the beta value? Which beta divergence are you using? You can try beta=2 which is more numerically stable in my experience.

yoyolicoris avatar Jan 29 '21 02:01 yoyolicoris

@chadD123321 I have updated this package recently, could you help try again on the newest version? Docs and installation: https://pytorch-nmf.readthedocs.io/en/latest/ Please install directly from github (the pypi version has some bugs.)

yoyolicoris avatar Mar 09 '21 07:03 yoyolicoris