hitcszq / NMF-Tensorflow

Non-negative Matrix Factorization (NMF) Tensorflow Implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NMF-Tensorflow

Non-negative Matrix Factorization (NMF) Tensorflow Implementation.

Examples

>>> import numpy as np
>>> from nmf import NMF
>>> V = np.array([[1, 1], [2, 1], [3, 1.2], [4, 1], [5, 0.8], [6, 1]])
>>> model = NMF(max_iter=200,learning_rate=0.01,display_step=10, optimizer='mu')
>>> W, H = model.fit_transform(V, r_components=2, initW=False, givenW=0)
>>> print(V)
>>> print(model.inverse_transform(W, H))

Optimization

  • Gradient Descent with Multiplicative Update Rule
  • Projected Gradient

TODO:

  • Sparse NMF
  • Discriminant NMF

About

Non-negative Matrix Factorization (NMF) Tensorflow Implementation


Languages

Language:Python 100.0%