From ef3c9106c615e44611748ea27ea83690097f3c88 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 20 Mar 2024 09:46:10 +0100 Subject: [PATCH 1/2] Moved `solve()` call up one level Should save lots of calculations. --- R/admm_MADMMplasso.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/admm_MADMMplasso.R b/R/admm_MADMMplasso.R index 36779af..0b5b54c 100644 --- a/R/admm_MADMMplasso.R +++ b/R/admm_MADMMplasso.R @@ -110,6 +110,7 @@ admm_MADMMplasso <- function(beta0, theta0, beta, beta_hat, theta, rho1, X, Z, m SVD_D <- Diagonal(x = svd.w$d) R_svd <- (svd.w$u %*% SVD_D) / N + R_svd_inv <- solve(R_svd) rho <- rho1 Big_beta11 <- V @@ -155,8 +156,8 @@ admm_MADMMplasso <- function(beta0, theta0, beta, beta_hat, theta, rho1, X, Z, m part_z <- DD3 %*% t(W_hat) part_y <- DD3 %*% my_beta_jj - beta_hat_j <- solve(solve(R_svd) + (svd.w$tv) %*% part_z) - beta_hat_j <- beta_hat_j %*% ((svd.w$tv) %*% part_y) + beta_hat_j <- solve(R_svd_inv + svd.w$tv %*% part_z) + beta_hat_j <- beta_hat_j %*% (svd.w$tv %*% part_y) beta_hat_j <- part_z %*% beta_hat_j beta_hat_JJ <- part_y - beta_hat_j beta_hat_JJ <- matrix(beta_hat_JJ, ncol = 1) From 8130c12fdab9c934862a10934d4bdc61d5d4a524 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 20 Mar 2024 10:14:07 +0100 Subject: [PATCH 2/2] Increment version number to 0.0.0.9017 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5a0ecea..b95c3c8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: MADMMplasso Title: Multi Variate Multi Response 'ADMM' with Interaction Effects -Version: 0.0.0.9016 +Version: 0.0.0.9017 Authors@R: c( person(