Maximises log det Theta - trace(S Theta) - lambda |Theta|_1 by ESL Alg. 17.2:
W starts at S + lambda I and each column solves a modified lasso by the
coordinate descent of eq 17.26; the diagonal is penalised as in glasso.
Usage
morie_esl_graphical_lasso(
S,
lambda,
max_iter = 1000,
tol = 1e-12,
max_inner = 10000
)
Arguments
- S
Empirical covariance matrix.
- lambda
Penalty.
- max_iter, tol, max_inner
Convergence controls.
Value
Named list: Sigma, Theta, iterations, converged.
References
Friedman, J., Hastie, T. & Tibshirani, R. (2008). Biostatistics
9, 432-441.
Examples
i <- 1:60
Z <- cbind(sin(i), cos(2 * i) + 0.5 * sin(i), sin(3 * i))
round(morie_esl_graphical_lasso(cov(Z), 0.1)$Theta, 3)
#> [,1] [,2] [,3]
#> [1,] 1.722 -0.330 0.000
#> [2,] -0.330 1.464 0.000
#> [3,] 0.000 0.000 1.557