Skip to content

Commit

Permalink
Doc: clarify chol_params order
Browse files Browse the repository at this point in the history
  • Loading branch information
gil2rok committed Aug 16, 2024
1 parent f80b593 commit c2b38eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blackjax/vi/fullrank_vi.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ def _unflatten_cholesky(chol_params):
"""Construct the Cholesky factor from a flattened vector of cholesky parameters.
Transforms a flattened vector representation of a lower triangular matrix
into a full Cholesky factor. The input vector contains n = dim * (dim + 1) / 2
elements, where dim is the dimension of the resulting square matrix.
into a full Cholesky factor. The input vector contains n = d(d+1)/2 elements
consisting of d diagonal elements followed by n - d off-diagonal elements in
row-major order, where d is the dimension of the matrix.
The diagonal elements are passed through a softplus function to ensure (numerically
stable) positivity, crucial to maintain a valid covariance matrix parameterization.
Expand Down

0 comments on commit c2b38eb

Please sign in to comment.