Skip to content

Conversation

@fsxbhyy
Copy link
Collaborator

@fsxbhyy fsxbhyy commented Nov 21, 2024

  1. Add metropolis_hasting as a unit function in mcmc
  2. Add proposal_dist, integrand f, fx and f_dim to the Class fields.
  3. Add Sample class.
  4. Change sample function to make inplace update for a received Sample class object.

@fsxbhyy fsxbhyy added the enhancement New feature or request label Nov 21, 2024
@fsxbhyy fsxbhyy requested a review from houpc November 21, 2024 04:28
@fsxbhyy fsxbhyy self-assigned this Nov 21, 2024
sample.u, sample.jac = self.q0.sample(sample.nsample)
if not self.maps:
return u, log_detJ
sample.x = sample.u
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sample.x[:] = sample.u for safety?


self.f = f
self.f_dim = f_dim
self.fx = torch.empty(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.fx has been given in init().

@fsxbhyy fsxbhyy merged commit d7b7add into dev Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants