From d3294edc9ab1f1d4539750070426b6698c15c518 Mon Sep 17 00:00:00 2001 From: Johan Larsson Date: Tue, 5 Dec 2023 10:10:43 +0100 Subject: [PATCH] feat: return alpha and lambda from slope() --- src/slope/results.h | 2 ++ src/slope/slope.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slope/results.h b/src/slope/results.h index dba7422..d8baa58 100644 --- a/src/slope/results.h +++ b/src/slope/results.h @@ -9,6 +9,8 @@ struct Results { const Eigen::VectorXd beta0s; const Eigen::SparseMatrix betas; + const Eigen::ArrayXd alpha; + const Eigen::ArrayXd lambda; const std::vector primals; }; diff --git a/src/slope/slope.h b/src/slope/slope.h index e6de488..1f0d6f2 100644 --- a/src/slope/slope.h +++ b/src/slope/slope.h @@ -298,7 +298,7 @@ slope(const T& x, Eigen::SparseMatrix betas(p, path_length); betas.setFromTriplets(beta_triplets.begin(), beta_triplets.end()); - return { beta0s, betas, primals }; + return { beta0s, betas, alpha, lambda, primals }; } } // namespace slope