← Back to all sparks
T

tulpaRatio

ANALYTICS
Velocity0.0

Bayesian Hierarchical Models for Ratios, Rates, and Proportions

A Bayesian ratio-modelling package that threw out its Stan dependency and wrote its own sampler

bayesian-inferencehmc-nutsspatial-statisticsperformancestan-alternativer-package
Current state
ratiod models ratios, rates and proportions hierarchically, with the stated position that a ratio is a derived quantity and inference should run on the latent numerator and denominator processes rather than their quotient. The 1.0.0 release shipped a native HMC/NUTS backend, removing the Stan dependency that packages in this space normally take as given. Everything since has been sampler optimisation, benchmarked against the Stan implementations it replaced.
Where it's heading
The feed reads as one architectural bet followed by the work to justify it. After the native backend landed, the releases are a steady march of gradient and adaptation work — hand-coded gradients for more model families, L-BFGS mass matrix adaptation, an O2 build — each measured as a speed multiple against Stan. Coverage is tracked openly as a fraction (48 of 60 hand-coded configs), and unresolved problems are named rather than buried, including a deferred GP spatial bug.
Prediction
The hand-coded gradient coverage count is the visible backlog, so the next releases most likely close the remaining configs and resolve the GP spatial issue that the benchmark release explicitly deferred.

Recent moves

  1. 6mo ago

    Hand-coded gradients reach binomial zero-inflated and hurdle models

    Extends the hand-coded gradient path to binomial ZI and hurdle families, moving coverage to 48 of 60 configurations. This is the incremental fill-in work that makes the native sampler competitive across the model catalogue rather than just the common cases.

    View source ↗
  2. 6mo ago

    Gaussian process sampling reaches roughly 4x Stan

    Closes the first optimisation phase with GP models running about four times faster than the Stan equivalent. It converts the earlier architectural decision into a measured result for the model family that had been the weakest performer.

    View source ↗
  3. 7mo ago

    L-BFGS mass matrix adaptation for MSGP models

    Adds L-BFGS mass matrix adaptation to the sampler for MSGP models, a tuning change users see only as better convergence. It is one step in the optimisation sequence that follows the native backend decision.

    View source ↗
  4. 7mo ago

    Benchmarks published for 35 of 40 model configurations

    Publishes reproducible benchmarks validating the native backend across 35 of 40 configurations, with spatial ICAR/BYM2 at 13-22x and temporal models at 6-14x against Stan. Notably it also names an unresolved GP spatial bug rather than omitting it, which is what makes the numbers readable as evidence.

    View source ↗
  5. 7mo ago

    First stable release ships a native HMC/NUTS backend, no Stan required

    ⚡ SPARK

    The release that sets the direction everything after it serves. Three model families, spatial CAR and BYM2 priors, nested and crossed random effects, and LOO/WAIC comparison all run on a sampler the package implements itself.

    View source ↗