Skip to content

Add sample_batched and log_prob_batched to posteriors #990

Closed

Description

@manuelgloeckler

Description

The current posterior estimators only support a single x_o (or iid x_os), for sampling and log_prob.

This can be inefficient when we want to sample from a batch of x_o (or iid x_os) as it requires a for-loop.

Fix

The new DensityEstimators already implement the capability to evaluate and sample for batches.
To preserve the current behaviour of the posterior classes, we would instead add:

  • sample_batched samples for a batch of x_o
  • log_prob_batched log_probs for a batch of x_o

Activity

  1. added
    enhancement
    hackathon
    on Mar 13, 2024
  2. manuelgloeckler commented on May 28, 2024

    @manuelgloeckler
    ContributorAuthor

    #1153 implemets this

  3. linked a pull request that will close this issuefeat: batched sampling for MCMC #1176on Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhackathon

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions