Skip to content

Commit

Permalink
Update MADMMplasso.R
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo-qua committed Feb 20, 2024
1 parent 0891fcf commit 77134bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
src/*.o
src/*.so
src/*.dll
3 changes: 2 additions & 1 deletion R/MADMMplasso.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

#' @example inst/examples/MADMMplasso_example.R
#' @export
MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, max_it = 50000, e.abs = 1E-3, e.rel = 1E-3, maxgrid, nlambda, rho = 5, my_print = FALSE, alph = 1.8, tree, parallel = TRUE, pal = 0, gg = NULL, tol = 1E-4, cl = 4, legacy = FALSE) {
MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, max_it = 50000, e.abs = 1E-3, e.rel = 1E-3, maxgrid, nlambda, rho = 5, my_print = FALSE, alph = 1.8, tree, parallel = TRUE, pal = 0, gg = NULL, tol = 1E-4, cl = 4, legacy = TRUE) {
N <- nrow(X)

p <- ncol(X)
Expand Down Expand Up @@ -194,6 +194,7 @@ MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, ma
new_y <- y - (matrix(1, N) %*% beta0 + Z %*% ((theta0)))

XtY <- crossprod((my_W_hat), (new_y))
print(legacy)


cl1 <- cl
Expand Down

0 comments on commit 77134bf

Please sign in to comment.