Learn R Programming

rliger (version 1.0.0)

optimizeNewLambda: Perform factorization for new lambda value

Description

Uses an efficient strategy for updating that takes advantage of the information in the existing factorization; uses previous k. Recommended mainly when re-optimizing for higher lambda and when new lambda value is significantly different; otherwise may not return optimal results.

Usage

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

Arguments

object

liger object. Should call optimizeALS before calling.

new.lambda

Regularization parameter. Larger values penalize dataset-specific effects more strongly.

thresh

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

max.iters

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

rand.seed

Random seed for reproducibility (default 1).

verbose

Print progress bar/messages (TRUE by default)

Value

liger object with optimized factorization values

Examples

Run this code
# NOT RUN {
# decide to run with lambda = 15 instead (keeping k the same)
ligerex <- optimizeNewLambda(ligerex, new.lambda = 15)
# }

Run the code above in your browser using DataLab