gmf {EMMIXmfa}R Documentation

General Matrix Factorization

Description

Performs a matrix factorization on the given data set. The factorization is done using a stochastic gradient decent method.

Usage

gmf(Y, q, maxit = 1000, lambda = 0.01, cor_rate = 0.9)

Arguments

Y

data matrix containing all numerical values.

maxit

maximum number of iterations.

q

number of factors.

lambda

initial learning rate.

cor_rate

correction rate.

Details

Unsupervised matrix factorization of a n×pn \times p data matrix YY can be expressed as,

YAB, Y^{\top} \approx A B^{\top},

where AA is a p×qp \times q matrix and BB is n×qn \times q matrix. With this matrix factorization method, one replaces the iith row in matrix YY by the iith row in matrix BB. The matrices AA and BB are chosen to minimize an objective function f(Y,A,B)f(Y, A, B) with under constraints specific to the matrix factorization method.

It is imperative that columns of the data matrix be on the same scale. Otherwise, it may not be possible to obtain a factorization of the data using this approach.

Value

A list containing,

A

A numeric matrix of size p×qp \times q

B

A numeric matrix of size n×qn \times q matrix

References

Nikulin V, Huang T-H, Ng SK, Rathnayake SI, & McLachlan GJ (2011). A very fast algorithm for matrix factorization. Statistics & Probability Letters 81, 773–782.

Examples

lst <- gmf(iris[, -5], q = 2, maxit = 100)

[Package EMMIXmfa version 2.0.14 Index]