Skip to content

Commit

Permalink
Group loss/penalty/objective in output
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjie2wang committed Jan 5, 2024
1 parent b2ace3e commit 344d43b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/template_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ inline Rcpp::List template_fit(T& object)
Rcpp::Named("kappa_ratio") = object.control_.kappa_ratio_,
Rcpp::Named("gamma") = object.control_.gamma_
),
Rcpp::Named("loss") = abclass::arma2rvec(object.loss_),
Rcpp::Named("penalty") = abclass::arma2rvec(object.penalty_),
Rcpp::Named("objective") = abclass::arma2rvec(object.objective_),
Rcpp::Named("optimization") = Rcpp::List::create(
Rcpp::Named("loss") = abclass::arma2rvec(object.loss_),
Rcpp::Named("penalty") = abclass::arma2rvec(object.penalty_),
Rcpp::Named("objective") = abclass::arma2rvec(object.objective_)
),
Rcpp::Named("cross_validation") = cv_res,
Rcpp::Named("et") = et_res
);
Expand Down

0 comments on commit 344d43b

Please sign in to comment.