volnmf_estimate: Alternating optimization of volume-regularized NMF

View source: R/volnmf_estimate.R

volnmf_estimateR Documentation

Alternating optimization of volume-regularized NMF

Description

volnmf_estimate provides alternating optimization of volume-regularized factorization of a matrix B using the following objective function: F = ||B*Q - C*R||^2 + w.vol*volume(R). Matrix C is required to be non-negative and having either column or row vectors on the simplex. Matrix R can optionally have non-negativity constraint. Matrix Q can optionally be identity matrix or any unitary.

Usage

volnmf_estimate(
  B,
  C,
  R,
  Q,
  domain = "covariance",
  volf = "logdet",
  R.majorate = FALSE,
  wvol = NULL,
  delta = 1e-08,
  n.iter = 10000,
  err.cut = 1e-08,
  vol.iter = 100,
  c.iter = 100,
  extrapolate = TRUE,
  accelerate = TRUE,
  acc.C = 4/5,
  acc.R = 3/4,
  C.constraint = "col",
  C.bound = 1,
  R.constraint = "pos",
  verbose = TRUE,
  record = 100,
  Canchor = NULL,
  Ctrue = NULL,
  mutation.run = FALSE
)

Arguments

B

A numeric matrix. A matrix to factorize (by default NULL). If not given than matrix B is taken to be a square root decomposition of P = B*t(B).

C

Numeric matrices. Initial matrices for optimiztion.

R

Numeric matrices. Initial matrices for optimiztion.

Q

Numeric matrices. Initial matrices for optimiztion.

domain

A character. Optimize unitary rotation matrix Q ("covariance") or keep it as identity matrix (as in standard NMF). By default "covariance".

volf

A character. Function that approximate volume. Can have values of "logdet" or "det" (by default "logdet").

R.majorate

A boolean. Majorate logdet each iteration of volnmf_logdet() (by default FALSE).

wvol

A numeric. A weight of volume-regularized term volume(R).

delta

A numeric. Logdet regularization term log(det(R) + delta) (by default 1e-8).

n.iter

An integer. Number of iterations (by default 1,000).

err.cut

A numeric. Relative error in determinant between iterations to stop algorithm (by default 1e-8).

vol.iter

An integer. Number of iterations to update volume-regularized matrix R at each alternating step.

c.iter

An integer. Number of iterations to update simplex matrix C at each alternating step.

extrapolate

A numeric. Do Nesterov extrapolation inside blocks of R and C optimization (by default TRUE).

accelerate

A numeric. Do acceleration each update after R and C blocks estimated via Nesterov-like extrapolation.

acc.C

A numeric. Acceleration parameter of matrix C.

acc.R

A numeric. Acceleration parameter of matrix R.

C.constraint

A character. Constraint either sum of columns ("col") or sum of rows ("row) to be equal to C.bound (By default "col").

C.bound

A numeric. A simplex constraint on matrix C vectors.

R.constraint

A character. Set up non-negativity ("pos") constraint on elements of R (by default "pos", alternative "no").

verbose

A boolean. Print per-iteration information (by default FALSE)

record

A numeric. Record parameters every 'record' iterations (by default NULL).

Canchor

A matrix. A matrix of anchor components (unused currently). (default=NULL)

Ctrue

A matrix. Correct matrix C if known. Useful for benchmark.

mutation.run

A boolean. Assess goodness of solution using reflection test if mutation.run=TRUE (applicable only to analysis of mutation patterns). (default=FALSE)

Value

List of objects:

C, R, Q, E Factorization matrices.

iter, err Number of iterations and relative per-iteration error err in matrix C.

info.record a list of objects that record and store state of matrices each record iterations.


vrnmf documentation built on March 18, 2022, 6:11 p.m.