nmf0: Fit a Fast Scalable Non-negative Matrix Factorization using...

Description Usage Arguments Value References Examples

View source: R/nmf0.R

Description

Fits a grade of membership model using non-negative matrix factorization using L-0 penalization that can handle large scale input data and is fast and scalable. Also allows for unsupervised and semi-supervised set ups for factors/clusters. X=LF

Usage

1
2
3
nmf0(Xmat, K = 1L, knownF, lambda1 = 0.1, lambda2 = 0.1,
  lambda3 = 0.1, tol = 1e-04, maxiter = 1000, verb = TRUE,
  init_method = "random", hard_keep = NULL)

Arguments

K

the number of clusters to fit. Must be an integer.

knownF

The number of known factors to be used. Default is missing in which case the unsupervised NMF0 method is used.

lambda1

The tuning parameter for the L-0 penalty on the loading matrix L

lambda2

The tuning parameter for the L-2 penalty on the loading matrix L

lambda3

The tuning parameter for the L-2 penalty on the factor matrix F

tol

The relative tolerance which when met calls for stoppage in the optimization run

maxiter

The maximum number of iterations for which to run the iterative updates in nmf0

verb

If TRUE, prints the progress of the model fit

init_method

The method for initializing the NMF method. Can be one of two values - random and svd. when init_method=random, the initial updates to L and F are decided randomly

hard_keep

The maximum number of clusters that are representative of each sample.

X

The input data matrix with rows being the features and columns the samples.

Value

Outputs the best NMF0 fitted model for cluster K that includes the estimated L and F matrices, and the model likelihood.

References

Hussein Hazimeh and Rahul Mazumder.2018. Fast Best Subset Selection: Coordinate Descent and Local Combinatorial Optimization Algorithms. arXiv preprint arXiv:1803.01454.

Examples

1
2
data("ex.counts")
out <- nmf0(t(ex.counts), K=4, tol=0.001, maxiter=1000, verb=FALSE)

kkdey/NMF0 documentation built on Jan. 19, 2021, 10 a.m.