GenerateWmatricesandHmatrix {jrSiCKLSNMF}R Documentation

Initialize the \mathbf{W} matrices in each modality and the shared \mathbf{H} matrix

Description

Create the \mathbf{W}^v matrices and \mathbf{H} matrix via non-negative double singular value decomposition (NNDSVD) (Boutsidis and Gallopoulus 2008; Gaujoux and Seoighe 2010) or randomization. For randomization, the algorithm runs for 10 rounds for the desired number of random initializations and picks the \mathbf{W}^v matrices and \mathbf{H} matrix with the lowest achieved loss.

Usage

GenerateWmatricesandHmatrix(
  SickleJr,
  d = 10,
  random = FALSE,
  numberReps = 100,
  seed = 5,
  minibatch = FALSE,
  batchsize = -1,
  random_W_updates = FALSE,
  subsample = 1:dim(SickleJr@count.matrices[[1]])[2],
  usesvd = FALSE
)

Arguments

SickleJr

An object of class SickleJr

d

Number of latent factors to use: defaults to 10

random

Boolean indicating whether to use random initialization (TRUE) or NNDSVD (FALSE): default is NNDSVD

numberReps

Number of random initializations to use: default is 5

seed

Random seed for reproducibility of random initializations

minibatch

Indicates whether or not to use the mini-batch algorithm

batchsize

Size of batches for mini-batch NMF

random_W_updates

Indicates whether to only update each \mathbf{W}^v once per round of \mathbf{H} updates; only appropriate for mini-batch algorithms

subsample

A vector of values to use for subsampling; only appropriate when determining proper values for d.

usesvd

Indicates whether to use R's singular value decomposition function svd (TRUE) or irlba (FALSE), default is FALSE; use irlba for larger datasets to increase performance

Value

SickleJr An object of class SickleJr with the \mathbf{W}^v matrices and \mathbf{H} matrix added.

References

Boutsidis C, Gallopoulos E (2008). “SVD based initialization: A head start for nonnegative matrix factorization.” Pattern Recognition, 41(4), 1350–1362. ISSN 00313203, doi:10.1016/J.PATCOG.2007.09.010.

Gaujoux R, Seoighe C (2010). “A flexible R package for nonnegative matrix factorization.” BMC Bioinformatics, 11(1), 1–9. ISSN 14712105, doi:10.1186/1471-2105-11-367/FIGURES/5, https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-11-367.

Examples

SimSickleJrSmall<-SetLambdasandRowReg(SimSickleJrSmall,
lambdaWlist=list(10,50),lambdaH=500,rowReg="None")
SimSickleJrSmall<-GenerateWmatricesandHmatrix(SimSickleJrSmall,d=5,usesvd=TRUE)


[Package jrSiCKLSNMF version 1.2.1 Index]