Skip to content

Commit

Permalink
feat: return alpha and lambda from slope()
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed Dec 5, 2023
1 parent 6bdeeda commit d3294ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/slope/results.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ struct Results
{
const Eigen::VectorXd beta0s;
const Eigen::SparseMatrix<double> betas;
const Eigen::ArrayXd alpha;
const Eigen::ArrayXd lambda;
const std::vector<double> primals;
};

Expand Down
2 changes: 1 addition & 1 deletion src/slope/slope.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ slope(const T& x,
Eigen::SparseMatrix<double> betas(p, path_length);
betas.setFromTriplets(beta_triplets.begin(), beta_triplets.end());

return { beta0s, betas, primals };
return { beta0s, betas, alpha, lambda, primals };
}

} // namespace slope

0 comments on commit d3294ed

Please sign in to comment.