Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Implement Full-Rank VI #720

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Commits on Aug 14, 2024

  1. fullrank vi first draft

    gil2rok committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    cbaff41 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. Fix: cholesky factor as flattened PyTree

    Define `chol_params` as a flattened Cholesky factor PyTree that consists
    of diagonal elements followed by the off-diagonal elements in row-major
    order for n = dim * (dim + 1) / 2 elements.
    
    The diagonal (first dim elements) are passed through a softplus function
    to ensure positivity, crucial to maintain a valid covariance matrix
    
    This parameterization allows for unconstrained optimization while
    ensuring the resulting covariance matrix Sigma = CC^T is symmetric and
    positive definite.
    
    The `chol_params` are then reshaped into a lower triangular matrix
    `chol_factor` using `jnp.tril` and `jnp.diag` functions.
    gil2rok committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    f80b593 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c2b38eb View commit details
    Browse the repository at this point in the history
  3. Doc: formatting

    gil2rok committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    b13eb12 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4ea435c View commit details
    Browse the repository at this point in the history
  5. Doc: formatting

    gil2rok committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    5119889 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6b9c002 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. Fix: Non-jitted full-rank VI works

    Fix testing bug, add docstrings, and change softmax to exponential when
    converting `chol_params` to `chol_factor` in `_unflatten_cholesky`.
    gil2rok committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    4379a6d View commit details
    Browse the repository at this point in the history
  2. Doc: formatting

    gil2rok committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    bb08e1f View commit details
    Browse the repository at this point in the history
  3. Fix: Full-rank VI compatible with JIT compilation

    Refactor `_unflatten_cholesky()` function to take `dim` argument instead
    of infering it (dynamically) from the `chol_params` input vector. This
    avoids JIT compilation issues.
    
    Also update docstrings.
    gil2rok committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    ced702f View commit details
    Browse the repository at this point in the history
  4. Doc: formatting

    gil2rok committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    26da046 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Tests: Check full-rank covariance matrix

    Add assert statements that verify full-rank VI recovers the true,
    full-rank covariance matrix.
    gil2rok committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    4b4534f View commit details
    Browse the repository at this point in the history