nmf

Very Large and Very Sparse Non Negative Matrix factorization

て烟熏妆下的殇ゞ 提交于 2021-02-07 07:19:04
问题 I have a very large and also sparse matrix (531K x 315K), the number of total cells is ~167 Billion. The non-zero values are only 1s. Total number of non-zero values are around 45K. Is there an efficient NMF package to solve my problem? I know there are couple of packages for that and they are working well only for small size of data matrix. Any idea helps. Thanks in advance. 回答1: scikit-learn will handle this easily ! Code: from time import perf_counter as pc import numpy as np import scipy

Very Large and Very Sparse Non Negative Matrix factorization

白昼怎懂夜的黑 提交于 2021-02-07 07:18:15
问题 I have a very large and also sparse matrix (531K x 315K), the number of total cells is ~167 Billion. The non-zero values are only 1s. Total number of non-zero values are around 45K. Is there an efficient NMF package to solve my problem? I know there are couple of packages for that and they are working well only for small size of data matrix. Any idea helps. Thanks in advance. 回答1: scikit-learn will handle this easily ! Code: from time import perf_counter as pc import numpy as np import scipy

Reconstructing new data using sklearn NMF components Vs inverse_transform does not match

假装没事ソ 提交于 2019-12-03 13:50:55
问题 I fit a model using scikit-learn NMF model on my training data. Now I perform an inverse transform of new data using result_1 = model.inverse_transform(model.transform(new_data)) Then I compute the inverse transform of my data manually taking the components from the NMF model, using the equation as in Slide 15 here. temp = np.dot(model.components_, model.components_.T) transform = np.dot(np.dot(model.components_.T, np.linalg.pinv(temp)), model.components_) result_2 = np.dot(new_data,

Is there good library to do nonnegative matrix factorization (NMF) fast?

爷,独闯天下 提交于 2019-12-03 10:12:48
问题 I have a sparse matrix whose shape is 570000*3000 . I tried nima to do NMF (using the default nmf method, and set max_iter to 65). However, I found nimfa very slow. Have anyone used a faster library to do NMF? 回答1: I have used libNMF before. It's written in C and is very fast. There is a paper documenting the algorithm and code. The paper also lists several alternative packages for NMF (in bunch of different languages (which I have copied here for future reference). The Mathworks [3, 33]

Reconstructing new data using sklearn NMF components Vs inverse_transform does not match

不羁岁月 提交于 2019-12-03 03:52:59
I fit a model using scikit-learn NMF model on my training data. Now I perform an inverse transform of new data using result_1 = model.inverse_transform(model.transform(new_data)) Then I compute the inverse transform of my data manually taking the components from the NMF model, using the equation as in Slide 15 here . temp = np.dot(model.components_, model.components_.T) transform = np.dot(np.dot(model.components_.T, np.linalg.pinv(temp)), model.components_) result_2 = np.dot(new_data, transform) I would like to understand why the 2 results do not match. What am I doing wrong while computing

Is there good library to do nonnegative matrix factorization (NMF) fast?

会有一股神秘感。 提交于 2019-12-03 00:43:58
I have a sparse matrix whose shape is 570000*3000 . I tried nima to do NMF (using the default nmf method, and set max_iter to 65). However, I found nimfa very slow. Have anyone used a faster library to do NMF? tskuzzy I have used libNMF before. It's written in C and is very fast. There is a paper documenting the algorithm and code. The paper also lists several alternative packages for NMF (in bunch of different languages (which I have copied here for future reference). The Mathworks [3, 33] Matlab http://www.mathworks.com/access/helpdesk/help/toolbox/stats/nnmf . Cemgil [5] Matlab http://www