optimizeNewK | R Documentation |
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.
optimizeNewK(
object,
k.new,
lambda = NULL,
thresh = 1e-04,
max.iters = 100,
rand.seed = 1,
verbose = TRUE
)
object |
|
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) |
liger
object with H, W, and V slots reset.
ligerex <- createLiger(list(ctrl = ctrl, stim = stim))
ligerex <- normalize(ligerex)
ligerex <- selectGenes(ligerex)
ligerex <- scaleNotCenter(ligerex)
k <- 5
# Minimum specification for fast example pass
ligerex <- optimizeALS(ligerex, k = k, max.iters = 1)
if (k != 5) {
ligerex <- optimizeNewK(ligerex, k.new = k, max.iters = 1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.