Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d49b6d

Browse files
venelarsmans
authored andcommitted
FIX: variable naming inconsistency in NMF
1 parent 2fd0147 commit 9d49b6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn/decomposition/nmf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,10 @@ def transform(self, X):
556556
Transformed data
557557
"""
558558
X = atleast2d_or_csr(X)
559-
H = np.zeros((X.shape[0], self.n_components))
559+
W = np.zeros((X.shape[0], self.n_components))
560560
for j in xrange(0, X.shape[0]):
561-
H[j, :], _ = nnls(self.components_.T, X[j, :])
562-
return H
561+
W[j, :], _ = nnls(self.components_.T, X[j, :])
562+
return W
563563

564564

565565
class NMF(ProjectedGradientNMF):

0 commit comments

Comments
 (0)