Skip to content

Commit

Permalink
Format C++ files.
Browse files Browse the repository at this point in the history
  • Loading branch information
doccstat committed Aug 31, 2023
1 parent 0e576a8 commit 01d0d4c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/fastcpd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ List negative_log_likelihood(
Function cv_glmnet = glmnet["cv.glmnet"],
predict_glmnet = glmnet["predict.glmnet"];
List out = cv_glmnet(
data.cols(1, data.n_cols - 1),
data.col(0),
Named("family") = "gaussian"
data.cols(1, data.n_cols - 1), data.col(0), Named("family") = "gaussian"
);
S4 out_coef = predict_glmnet(
out["glmnet.fit"],
Expand All @@ -47,10 +45,8 @@ List negative_log_likelihood(
Function deviance = stats["deviance"], glmnet_ = glmnet["glmnet"],
predict_glmnet = glmnet["predict.glmnet"];
List out = glmnet_(
data.cols(1, data.n_cols - 1),
data.col(0),
Named("family") = "gaussian",
Named("lambda") = lambda
data.cols(1, data.n_cols - 1), data.col(0),
Named("family") = "gaussian", Named("lambda") = lambda
);
S4 out_par = out["beta"];
arma::vec par_i = as<arma::vec>(out_par.slot("i"));
Expand Down

0 comments on commit 01d0d4c

Please sign in to comment.