Skip to content

Commit

Permalink
gaussian_simple.cpp: removing some unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
pbreheny committed Apr 20, 2024
1 parent d0d0ec2 commit c58de94
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gaussian_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ RcppExport SEXP cdfit_gaussian_simple_path(SEXP X_,
IntegerVector iter(L);
double l1, l2, shift, cp;
double max_update, update, thresh; // for convergence check
int i, j, jj, l, lstart; //temp indices
int i, j, l, lstart; //temp indices
int *ever_active = R_Calloc(p, int); // ever-active set
lstart = 0;
lambda = Rcpp::as<NumericVector>(lambda_);
Expand Down Expand Up @@ -297,7 +297,6 @@ RcppExport SEXP cdfit_gaussian_simple_path(SEXP X_,
// update beta
l1 = lambda[l] * m[j] * alpha;
l2 = lambda[l] * m[j] * (1-alpha);
beta(j,l) = lasso(z[j], l1, l2, xtx[j]); // TODO: add SCAD and MCP options
if (strcmp(penalty,"MCP")==0) beta(j,l) = MCP(z[j], l1, l2, gamma, xtx[j]);
if (strcmp(penalty,"SCAD")==0) beta(j,l) = SCAD(z[j], l1, l2, gamma, xtx[j]);
if (strcmp(penalty,"lasso")==0) beta(j,l) = lasso(z[j], l1, l2, xtx[j]);
Expand Down

0 comments on commit c58de94

Please sign in to comment.