A Base R, simple implementation of the No-Underrun Sampler. This package aims to mostly directly implement the algorithm as described by th
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update NURS.R

authored by

Visruth and committed by
GitHub
fdd1d83c 29d1c9af

+1 -2
+1 -2
R/NURS.R
··· 128 128 #' @source <https://arxiv.org/abs/2501.18548v2> 129 129 NURS <- function(logpdf, theta_init, n, epsilon, h, M) { 130 130 stopifnot(epsilon >= 0, h > 0) 131 - d <- length(theta_init) 132 - draws <- matrix(NA, n, d) 131 + draws <- matrix(0, n, length(theta_init)) 133 132 draws[1, ] <- theta_init 134 133 for (i in 2:n) { 135 134 draws[i, ] <- NURS_step(logpdf, draws[i - 1, ], epsilon, h, M)