Skip to content

Commit

Permalink
Added my_values as argument to loop functions (#17)
Browse files Browse the repository at this point in the history
Because it is only recreated if `pal = 1`
  • Loading branch information
wleoncio committed Jan 26, 2024
1 parent b84e55a commit 4023f01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/MADMMplasso.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, ma
lam, nlambda, beta0, theta0, beta, beta_hat, theta, rho1, X, Z, max_it,
my_W_hat, XtY, y, N, e.abs, e.rel, alpha, alph, svd.w, tree, my_print,
invmat, gg, tol, parallel, pal, BETA0, THETA0, BETA,
BETA_hat, Y_HAT, THETA, D, legacy
BETA_hat, Y_HAT, THETA, D, my_values, legacy
)

remove(invmat)
Expand Down
2 changes: 1 addition & 1 deletion R/hh_nlambda_loop.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ hh_nlambda_loop <- function(
lam, nlambda, beta0, theta0, beta, beta_hat, theta, rho1, X, Z, max_it,
my_W_hat, XtY, y, N, e.abs, e.rel, alpha, alph, svd.w, tree, my_print,
invmat, gg, tol, parallel, pal, BETA0, THETA0, BETA,
BETA_hat, Y_HAT, THETA, D, legacy = TRUE
BETA_hat, Y_HAT, THETA, D, my_values, legacy = TRUE
) {
if (legacy) {
obj <- NULL
Expand Down
3 changes: 2 additions & 1 deletion src/hh_nlambda_loop_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Rcpp::List hh_nlambda_loop_cpp(
Rcpp::List BETA_hat,
Rcpp::List Y_HAT,
Rcpp::List THETA,
const unsigned int D
const unsigned int D,
Rcpp::List my_values
) {
arma::vec obj;
arma::vec non_zero_theta;
Expand Down

0 comments on commit 4023f01

Please sign in to comment.