Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

optimizeNewK

Perform factorization for new value of k


Description

This uses an efficient strategy for updating that takes advantage of the information in the existing factorization. It is most recommended for values of k smaller than current value, where it is more likely to speed up the factorization.

Usage

optimizeNewK(
  object,
  k.new,
  lambda = NULL,
  thresh = 1e-04,
  max.iters = 100,
  rand.seed = 1,
  verbose = TRUE
)

Arguments

object

liger object. Should call optimizeALS before calling.

k.new

Inner dimension of factorization (number of factors)

lambda

Regularization parameter. By default, this will use the lambda last used with optimizeALS.

thresh

Convergence threshold. Convergence occurs when |obj0-obj|/(mean(obj0,obj)) < thresh (default 1e-4).

max.iters

Maximum number of block coordinate descent iterations to perform (default 100).

rand.seed

Random seed to set. Only relevant if k.new > k. (default 1)

verbose

Print progress bar/messages (TRUE by default)

Value

liger object with H, W, and V slots reset.

Examples

## Not run: 
# decide to run with k = 15 instead (keeping old lambda the same)
ligerex <- optimizeNewK(ligerex, k.new = 15)

## End(Not run)

rliger

Linked Inference of Genomic Experimental Relationships

v1.0.0
GPL-3
Authors
Joshua Welch [aut, ctb], Chao Gao [aut, ctb, cre], Jialin Liu [aut, ctb], Joshua Sodicoff [aut, ctb], Velina Kozareva [aut, ctb], Evan Macosko [aut, ctb], Paul Hoffman [ctb], Ilya Korsunsky [ctb], Robert Lee [ctb]
Initial release
2021-04-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.