solve_optim1_seq: Solves penalized matrix factorization problem for the range...

Description Usage Arguments Value Examples

View source: R/Algorithm1.R

Description

Solves penalized matrix factorization problem for the range of lambda values

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
solve_optim1_seq(
  X,
  pvec,
  lambda_seq = NULL,
  n_lambda = 50,
  lambda_max = 1,
  lambda_min = 0.01,
  k_max = 1000,
  eps = 1e-06
)

Arguments

X

A n x p concatenated data matrix of views X_1,...,X_d.

pvec

A vector of values p_1,....,p_d corresponding to the number of measurements within each data view.

lambda_seq

An optional sequence of tuning parameters for the penalized matrix decomposition problem. By default, the algorithm generates its own sequence based on supplied values of n_lambda, lambda_min and lambda_max.

n_lambda

A length of tuning parameter sequence. The default value is 50. It is only used when lambda_seq = NULL.

lambda_max

A maximal value for tuning parameter. The default value is 1. If X is already standardized, it is recommended to set lambda_max to the largest singular value within the view.

lambda_min

A minimal tuning parameter to be considered, the default value is 0.1

k_max

A maximal number of allowed iterations, the default value is 1000.

eps

A convergence tolerance criterion as measured by the differene in objective functions at successive iterations, the default value is 1e-06.

Value

A list with the elements

lambda

A sequence of tuning parameters used.

param

A list with estimates of U and V obtained from solving the penalized matrix factorization problem with corresponding values of tuning parameter.

Examples

1
2
3
4
5
6
7
8
n = 50
p1 = 20
p2 = 40
X1 = matrix(rnorm(n*p1), n, p1)
X2 = matrix(rnorm(n*p2), n, p2)
X = cbind(X1, X2)
out = standardizeX(X, pvec = c(p1,p2))
out_solve = solve_optim1_seq(X = out$X, pvec = c(p1,p2), lambda_max = max(out$svec), n_lambda = 30)

irinagain/SLIDE documentation built on Aug. 14, 2021, 2:56 p.m.