You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Snmf factorization method Snmf.factorize() does not handle transposes correctly across multiple runs.
In order to enforce sparseness on the left factor the method transposes self.V (lines 175-176) , fits the model and then back-transposes V and swaps W and H (lines 224-226). However, the initial transpose is done outside run loop which starts in line 178. Therefore, sparseness is not enforced on the same factor across runs, with odd runs being correct and even runs operating on the orignal self.V (self.V.T.T). Symptomatic for this, if nruns is even, W and H will be returned with the wrong dimensionality (i.e. swapped and transposed).
This should be easily fixable by moving lines 175-176 of snmf.py below line 178 to ensure a re-transpose of self.V before each new fit. #36
The text was updated successfully, but these errors were encountered:
The Snmf factorization method Snmf.factorize() does not handle transposes correctly across multiple runs.
In order to enforce sparseness on the left factor the method transposes self.V (lines 175-176) , fits the model and then back-transposes V and swaps W and H (lines 224-226). However, the initial transpose is done outside run loop which starts in line 178. Therefore, sparseness is not enforced on the same factor across runs, with odd runs being correct and even runs operating on the orignal self.V (self.V.T.T). Symptomatic for this, if nruns is even, W and H will be returned with the wrong dimensionality (i.e. swapped and transposed).
This should be easily fixable by moving lines 175-176 of snmf.py below line 178 to ensure a re-transpose of self.V before each new fit.
#36
The text was updated successfully, but these errors were encountered: