Skip to content

Commit

Permalink
Fix sign error in log density ratio for Langevin proposal (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-graham authored Oct 23, 2024
1 parent 697bc44 commit 4e6a527
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/langevin.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ log_density_ratio_langevin <- function(
proposed_state,
target_distribution,
scale_and_shape) {
sum(proposed_state$momentum()^2 - state$momentum()^2) / 2
sum(state$momentum()^2 - proposed_state$momentum()^2) / 2
}

#' Create a new Langevin proposal object.
Expand Down

0 comments on commit 4e6a527

Please sign in to comment.