fast_nmf: Non-negative Matrix Factorization

Description Usage Arguments Value References Examples

View source: R/svs.r

Description

A fast procedure for non-negative matrix factorization.

Usage

1
2
3
4
5
6
7
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 distance, or "ALS" for alternating least squares.

tol

Numeric specification of the convergence criterion.

Value

A list with components:

pos1

The coordinates of the first set of levels (viz. the row levels of a frequency table).

pos2

The coordinates of the second set of levels (viz. the column levels of a frequency table).

References

Lee, D. D. and H. S. Seung (1999) Learning the parts of objects by non-negative matrix factorization. Nature 401, 788–791.

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

Examples

1
2
3
4
5
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
   header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8",
   stringsAsFactors = FALSE)
nmf.SndT_Fra <- fast_nmf(SndT_Fra, k = 7)
nmf.SndT_Fra

svs documentation built on Nov. 10, 2020, 1:09 a.m.