Learn R Programming

svs (version 1.0.2)

fast_nmf: Non-negative Matrix Factorization

Description

A fast procedure for non-negative matrix factorization.

Usage

fast_nmf(dat, k, type = "KL", tol = 1e-08)

fast_nmf_KL(dat, k, tol = 1e-08)

fast_nmf_Fr(dat, k, tol = 1e-08)

fast_nmf_Al(dat, k, tol = 1e-08)

Arguments

dat
Input data: can be a table or a data frame (but the data frame must have only two columns).
k
Numeric specification of the number of latent axes to compute.
type
Character specification of the type of optimization: can in the current implementation be either "KL" for the Kullback-Leibler divergence, "Frobenius" or "euclidean" (or abbreviations thereof) for the euclidean dist
tol
Numeric specification of the convergence criterion.

Value

  • A list with components:
  • pos1The coordinates of the first set of levels (viz. the row levels of a frequency table).
  • pos2The coordinates of the second set of levels (viz. the column levels of a frequency table).

Examples

Run this code
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
   header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8")
nmf.SndT_Fra <- fast_nmf(SndT_Fra, k = 7)
nmf.SndT_Fra
}
references{
Lee, D. D. and H. S. Seung (1999) Learning the parts of objects by non-negative matrix factorization. emph{Nature} strong{401}, 788--791.

Lee, D. D. and H. S. Seung (2001) Algorithms for non-negative matrix factorization. emph{Advances in neural information processing systems}
  strong{13}, 556--562.
}

Run the code above in your browser using DataLab