Skip to content

Subclassing existing sampling algorithms / kernels? #410

Answered by rlouf
mhinne asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

  1. Could you please paste here the import that generates an error? generate_gaussian_noise is imported in a couple places in the lirbary using from blackjax.util import generate_gaussian_noise.
  2. You can create a new SMC kernel by calling from blackjax.smc.base import kernel (here in the code). This constructor requires two functions:
    • a mcmc_kernel_factory (you can see what this corresponds to here), which is just a function that returns a sampling step function given a logprob function.
    • a mcmc_kernel_generator, which given a position in the sample space returns the state that your sampling step function takes as an input. This is important for HMC, for instance: SMC takes positions as …

Replies: 2 comments 18 replies

Comment options

You must be logged in to vote
15 replies
@rlouf
Comment options

@mhinne
Comment options

@Hesterhuijsdens
Comment options

@maxhinne
Comment options

@rlouf
Comment options

Answer selected by rlouf
Comment options

You must be logged in to vote
3 replies
@mhinne
Comment options

@AdrienCorenflos
Comment options

@mhinne
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants