I am trying to use NMF from scikit learn. Given a matrix A this should give me a factorization into matrices W and H so that WH is approximately equal to A. As a sanity check I tried the following:
from sklearn.decomposition import NMF import numpy as np A = np.array([[0,1,0],[1,0,1],[1,1,0]]) nmf = NMF(n_components=3, init='random', random_state=0) print nmf.components_ This gives me a single 3 by 3 matrix as output. What is this representing? I want the two matrices W and H from the factorization. How can I get these two matrices? I am sure I am just missing something simple. Raphael _______________________________________________ scikit-learn mailing list [email protected] https://mail.python.org/mailman/listinfo/scikit-learn
