Package: gpumetropolis 0.5.3

gpumetropolis: GPU-Portable Vendor-Agnostic Metropolis-Hastings Sampler

A generic random-walk Metropolis-Hastings sampler for Markov chain Monte Carlo. The user declares a model by writing its log-likelihood and log-prior as one-sided formulas; the package compiles them to a stack-machine bytecode that a single portable kernel interprets, so the same model runs on the CPU and on the GPU from one source. The sampler advances many independent chains in one batched pass. A distributional equivalence harness based on the two-sample Kolmogorov-Smirnov test and the split R-hat statistic of Gelman and Rubin (1992) <doi:10.1214/ss/1177011136> checks the GPU output against the CPU output. Dispatching the kernel to a GPU helps when many chains are run or when the log-density is expensive to evaluate over a large data set, and does not help for small models run with few chains.

Authors:Pedro Carvalho Brom [aut, cre, cph]

gpumetropolis_0.5.3.tar.gz
gpumetropolis_0.5.3.zip(r-4.7)gpumetropolis_0.5.3.zip(r-4.6)gpumetropolis_0.5.3.zip(r-4.5)
gpumetropolis_0.5.3.tgz(r-4.6-x86_64)gpumetropolis_0.5.3.tgz(r-4.6-arm64)gpumetropolis_0.5.3.tgz(r-4.5-x86_64)gpumetropolis_0.5.3.tgz(r-4.5-arm64)
gpumetropolis_0.5.3.tar.gz(r-4.7-arm64)gpumetropolis_0.5.3.tar.gz(r-4.7-x86_64)gpumetropolis_0.5.3.tar.gz(r-4.6-arm64)gpumetropolis_0.5.3.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
gpumetropolis/json (API)

# Install 'gpumetropolis' in R:
install.packages('gpumetropolis', repos = c('https://pcbrom.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pcbrom/gpumetropolis/issues

On CRAN:

Conda:

rustcargo

4.43 score 1 stars 24 exports 0 dependencies

Last updated from:2ccfe2873b. Checks:4 ERROR, 7 NOTE, 1 OK, 1 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64ERROR325
linux-devel-x86_64NOTE319
source / vignettesOK603
linux-release-arm64ERROR326
linux-release-x86_64NOTE268
macos-release-arm64ERROR263
macos-release-x86_64NOTE520
macos-oldrel-arm64ERROR245
macos-oldrel-x86_64NOTE759
windows-develNOTE604
windows-releaseNOTE623
windows-oldrelNOTE569
wasm-releaseFAIL231

Exports:essgaussian_mean_posteriorgpu_metropolisgpum_bayes_factorgpum_crlbgpum_density_comparegpum_diagnosegpum_evidencegpum_hypothesisgpum_lfogpum_lmgpum_loogpum_modelgpum_pairsgpum_ppcgpum_regiongpum_ropegpum_surfacegpum_ts_modelgpum_waichdiks_equivalencemetropolis_gaussian_meanrhat

Dependencies:

Case study: the Nile flow, Bayesian inference beyond i.i.d.
1. The three ways data stop being i.i.d. | 2. Regime 2: a stationary AR(1) for the flow | 3. Regime 3: the dam as a covariate, dependence plus heterogeneity | 4. Model comparison that respects time | 5. Observed against generated, in time | 6. Where this stops, honestly | References

Last update: 2026-07-16
Started: 2026-07-16

A complete case on real data: the Old Faithful geyser
Part 1: a regular regression | Declaring and fitting the model | Checking convergence | The joint posterior | The Cramer-Rao reference | Deciding the relationship | Weighing the evidence for a slope | Head-to-head against the established packages | Part 2: an irregular mixture | The bimodal target | Why the random walk fails, and the Cramer-Rao refusal | Parallel tempering recovers both components | Choosing between one component and two | Observed against the generated distribution | What each tool contributed

Last update: 2026-06-29
Started: 2026-06-29

Bimodal extreme-value data: Gumbel mixture with parallel tempering
A real dataset: Oxford annual maximum temperatures | A single Gumbel as the Tier A candidate | Why a Gumbel mixture on Oxford is harder than it looks | A two-regime simulation, the recovery story | The mixture model in the DSL | Parallel tempering on the mixture posterior | Settling the choice by WAIC | Identifiability post-processing | Posterior predictive check | Fair comparison with current practice | Single Gumbel: matched by an established MLE pipeline | Two-component Gumbel mixture: no standard one-liner in R | What is manual today and what becomes automatic in v0.6.0 | References

Last update: 2026-06-29
Started: 2026-06-15

Differential Evolution on a correlated posterior, with a Cramer-Rao reference
The model | Random walk against Differential Evolution | The Cramer-Rao reference | Consistency and the n to the minus one-half rate | Honest positioning

Last update: 2026-06-29
Started: 2026-06-29

Differential Evolution on a curved target (the banana)
The model | The failure mode of diagonal random-walk Metropolis | The fix: Differential Evolution | Reading the result | Honest positioning

Last update: 2026-06-29
Started: 2026-06-29

Extreme sea levels on real data: return levels at Port Pirie
The Gumbel model | The joint posterior and the information bound | The return level, with its uncertainty | A design question as a hypothesis | Is the extreme-value law worth it? Gumbel against the Normal | Observed against the generated distribution | Head-to-head against the established packages | The shape parameter, and a limit of the scalar model | What this case exercised

Last update: 2026-06-29
Started: 2026-06-29

Getting started with gpumetropolis
Declaring a model | Running the sampler | The fit object | Convergence diagnostics | One source, several backends | A model with more than one parameter | When the GPU helps

Last update: 2026-06-29
Started: 2026-05-18

Model comparison on real data: fuel economy in mtcars
The simple model and its fit | Reading the posterior | Does horsepower add anything? Predictive comparison | Weighing the evidence for horsepower | Observed against the generated distribution | Head-to-head against the established packages | What this case exercised

Last update: 2026-06-29
Started: 2026-06-29

Parallel tempering for bimodal posteriors (M2)
The model | The failure mode of plain random-walk Metropolis | Parallel tempering | Inspecting the cold chain directly | Tuning notes for parallel tempering | What the focused re-run shows in numbers | When to reach for parallel tempering

Last update: 2026-06-29
Started: 2026-06-15