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.

Initial implementation

+25 -5
+1 -1
DESCRIPTION
··· 6 6 Description: A bare-bones R implementation of the No-Underrun Sampler 7 7 (Nawaf Bou-Rabee, Bob Carpenter, Sifan Liu, Stefan Oberdörster. 2025.) 8 8 written in base R. This implementation attempts to stick very closely 9 - to the algorithm described in Appendix A of the paper. 9 + to the algorithm described in Section 2 and Appendix A of the paper. 10 10 License: MIT + file LICENSE 11 11 Suggests: 12 12 matrixStats
+2 -2
R/NURS.R
··· 45 45 # hit 46 46 z <- rnorm(d) 47 47 rho <- z / sqrt(sum(z^2)) 48 + # https://artowen.su.domains/mc/Ch-randvectors.pdf (pg. 24) 48 49 49 50 # run 50 51 s <- runif(1, -h / 2, h / 2) ··· 55 56 ) 56 57 theta + s * rho else theta 57 58 58 - # helpers 59 59 log_eps_h <- log(epsilon) + log(h) 60 60 orbit_points <- list(theta0) 61 61 log_vals <- logpdf(theta0) 62 62 63 - # bookkeeping to get ends 63 + # bookkeeping to get orbit ends 64 64 left <- right <- 1 65 65 66 66 # Orbit selection procedure
+9 -1
README.Rmd
··· 18 18 <!-- badges: start --> 19 19 <!-- badges: end --> 20 20 21 - Base R implementation of the No-Underrun Sampler. 21 + A Base R, simple implementation of the No-Underrun Sampler. This implementation aims to mostly directly implement the algorithm as described by the paper, with at most small changes for code aesthetics and performance. 22 22 23 23 ## Installation 24 24 ··· 54 54 geom_point(alpha = 0.3) + 55 55 theme_minimal() 56 56 ``` 57 + 58 + ## References 59 + 60 + * Nawaf Bou-Rabee, Bob Carpenter, Sifan Liu, Stefan Oberdörster. 2025. 61 + [The No-Underrun Sampler: A locally adaptive, gradient free, MCMC 62 + method](https://arxiv.org/abs/2501.18548v2). *arXiv* 2501.18548 v2. 63 + 64 + * Art B. Owen. 2013. [Monte Carlo theory, methods and examples](https://artowen.su.domains/mc/). *artowen.su.domains*.
+13 -1
README.md
··· 7 7 8 8 <!-- badges: end --> 9 9 10 - Base R implementation of the No-Underrun Sampler. 10 + A Base R, simple implementation of the No-Underrun Sampler. This 11 + implementation aims to mostly directly implement the algorithm as 12 + described by the paper, with at most small changes for code aesthetics 13 + and performance. 11 14 12 15 ## Installation 13 16 ··· 46 49 ``` 47 50 48 51 <img src="man/figures/README-funnel-1.png" width="100%" /> 52 + 53 + ## References 54 + 55 + - Nawaf Bou-Rabee, Bob Carpenter, Sifan Liu, Stefan Oberdörster. 2025. 56 + [The No-Underrun Sampler: A locally adaptive, gradient free, MCMC 57 + method](https://arxiv.org/abs/2501.18548v2). *arXiv* 2501.18548 v2. 58 + 59 + - Art B. Owen. 2013. [Monte Carlo theory, methods and 60 + examples](https://artowen.su.domains/mc/). *artowen.su.domains*.