diff --git a/nimfa/methods/factorization/snmf.py b/nimfa/methods/factorization/snmf.py index 62c89b0..568c0ea 100644 --- a/nimfa/methods/factorization/snmf.py +++ b/nimfa/methods/factorization/snmf.py @@ -170,12 +170,14 @@ def factorize(self): Return fitted factorization model. """ - # in version SNMF/L, V is transposed while W and H are swapped and - # transposed. - if self.version == 'l': - self.V = self.V.T + for run in range(self.n_run): + # in version SNMF/L, V is transposed while W and H are swapped and + # transposed. + if self.version == 'l': + self.V = self.V.T + self.W, self.H = self.seed.initialize( self.V, self.rank, self.options) if sp.isspmatrix(self.W):