kimjingu / nonnegfac-python Goto Github PK
View Code? Open in Web Editor NEWPython toolbox for nonnegative matrix factorization
License: BSD 3-Clause "New" or "Revised" License
Python toolbox for nonnegative matrix factorization
License: BSD 3-Clause "New" or "Revised" License
Hello Mr. Kim thanks for the package, My name is Viqi Nurhaqiqi I'm student at Department of Informatics UIN Sunan Gunung Djati Bandung, I have written the following code from the example in your package :
`W_org = random.rand(3, 3)
H_org = random.rand(3, 3)
A = np.array([[0,1,0],[1,0,1],[1,1,0]])
W, H, info = NMF().run(A, 2)`
My question is how to show matrix decomposition from A ?
Thanks ton for the wonderful package! I was wondering if there is some way in which missing data can be handled? The trivial application being MovieLens like dataset. I was wondering if instead of the usual 0
rating for missing entries in the matrix, we could just let those entries be np.NaN
?
hello, I'm using NMF_ANLS_BLOCKPIVOT algorithm on a 200x990 matrix with this code
W1, H1, info1 = NMF_ANLS_BLOCKPIVOT().run(X1, 56, max_iter=500, verbose=1)
but after running for about 15 minutes, it shows an error for singular matrix:
File "nnmf.py", line 120, in
W1, H1, info1 = nmf().run(X1, rank, max_iter=500, verbose=1)
File "/home/navid/anaconda3/envs/fr/lib/python3.6/site-packages/nonnegfac/nmf.py", line 97, in run
(W, H) = self.iter_solver(A, W, H, k, i)
File "/home/navid/anaconda3/envs/fr/lib/python3.6/site-packages/nonnegfac/nmf.py", line 195, in iter_solver
Sol, info = nnlsm_blockpivot(W, A, init=H.T)
File "/home/navid/anaconda3/envs/fr/lib/python3.6/site-packages/nonnegfac/nnls.py", line 120, in nnlsm_blockpivot
AtA, AtB[:, not_opt_cols], PassSet[:, not_opt_cols])
File "/home/navid/anaconda3/envs/fr/lib/python3.6/site-packages/nonnegfac/nnls.py", line 322, in normal_eq_comb
Z[ix1] = nla.solve(AtA[ix2], AtB[ix1])
File "/home/navid/anaconda3/envs/fr/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 394, in solve
r = gufunc(a, b, signature=signature, extobj=extobj)
File "/home/navid/anaconda3/envs/fr/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 89, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.linalg.LinAlgError: Singular matrix
I searched the singular matrix error and I got this error happens if a numpy matrix isn't invertible.
now what should I do?
sorry for my bad english and I thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.