Type: | Package |
Title: | Non-Negative Matrix Factorization |
Version: | 2.0.1 |
Date: | 2011-01-02 |
Author: | Suhai (Timothy) Liu |
Maintainer: | Suhai (Timothy) Liu <tim.liu@alumni.duke.edu> |
Description: | Non-negative Matrix Factorization. |
License: | GPL-2 | GPL-3 [expanded from: GPL] |
LazyLoad: | yes |
Packaged: | 2022-06-23 07:15:15 UTC; hornik |
Repository: | CRAN |
Date/Publication: | 2022-06-23 07:18:36 UTC |
NeedsCompilation: | no |
Non-negative Matrix Factorization - Overview
Description
Non-negative Matrix Factorization
Details
Package: | NMFN |
Type: | Package |
Version: | 2.0 |
Date: | 2010-01-02 |
License: | GPL |
LazyLoad: | yes |
Author(s)
Suhai (Timothy) Liu <tim.liu@alumni.duke.edu> based on multiplicative updates (Lee and Seung 2001), alternating least squares and multinomial algorithms; Lars Kai Hansen's nnmf_als Matlab implementation; Torsten Hothorn's Moore-Penrose inverse function
References
Lee and Seung - Algorithms for non-negative matrix factorization. In Advances in Neural Information Processing Systems 13, 2001.
Examples
X <- matrix(1:12,3,4)
z.mm <- nnmf(X,3) # 3 factors via multiplicative update
z.als <- nnmf(X,3,'nnmf_als') # 3 factors via alternating least square
z.prob <- nnmf(X,3,'nnmf_prob') # 3 factors via multinomial
Euclidean Distance between two matrices
Description
Euclidean Distance between two matrices
Usage
distance2(x1, x2)
Arguments
x1 |
Matrix 1 |
x2 |
Matrix 2 |
Author(s)
Suhai (Timothy) Liu
Examples
X<-matrix(1:12,3,4)
Y<-matrix(5:16,3,4)
distance2(X,Y)
Moore-Penrose Inverse
Description
Moore-Penrose Inverse
Usage
mpinv(X)
Arguments
X |
original matrix |
Author(s)
Torsten Hothorn
Examples
X<-matrix(1:12,3,4)
m.inv = mpinv(X)
Non-negative Matrix Factorization
Description
Non-negative Matrix Factorization
Usage
nnmf(x, k, method = "nnmf_mm", maxiter = 1000, eps = 2.2204e-16)
Arguments
x |
original input matrix |
k |
number of factors / components |
method |
which method to use for matrix factorization (default - multiplicative update) |
maxiter |
max number of iterations |
eps |
small threshold value |
Author(s)
Suhai (TImothy) Liu
Examples
X <- matrix(1:12,3,4)
z.mm <- nnmf(X,3) # 3 factors via multiplicative update
z.als <- nnmf(X,3,'nnmf_als') # 3 factors via alternating least square
z.prob <- nnmf(X,3,'nnmf_prob') # 3 factors via multinomial
Non-negative Matrix Factorization via alternating least squares
Description
Non-negative Matrix Factorization - alternating least squares method
Usage
nnmf_als(x, k, maxiter, eps)
Arguments
x |
original input matrix |
k |
number of factors / components |
maxiter |
max number of iterations |
eps |
small threshold value |
Value
W, H - returned decomposed matrices
Author(s)
Suhai (Timothy) Liu
Examples
X <- matrix(1:12, 3, 4)
results <- nnmf(X, 2, 'nnmf_als')
Non-negative Matrix Factorization via multiplicative update
Description
Non-negative Matrix Factorization - multiplicative update method
Usage
nnmf_mm(x, k, maxiter, eps)
Arguments
x |
original input matrix |
k |
number of factors / components |
maxiter |
max number of iterations |
eps |
small threshold value |
Value
W, H - returned decomposed matrices
Author(s)
Suhai (Timothy) Liu
References
Lee and Sung 2001
Examples
X <- matrix(1:12, 3, 4)
results <- nnmf(X, 2)
#which is equivalent to
results <- nnmf(X, 2, 'nnmf_mm')
Non-negative Matrix Factorization via multinomial
Description
Non-negative Matrix Factorization - multinomial method
Usage
nnmf_prob(x, k, maxiter, eps)
Arguments
x |
original input matrix |
k |
number of factors / components |
maxiter |
max number of iterations |
eps |
small threshold value |
Value
W, H - returned decomposed matrices
Author(s)
Suhai (Timothy) Liu
Examples
X <- matrix(1:12, 3, 4)
results <- nnmf(X, 5, 'nnmf_prob')