Skip to content

Banana posterior - #339

Merged
JTorgander merged 4 commits into
stan-dev:developmentfrom
Uupali:banana-posterior
Oct 30, 2026
Merged

JTorgander merged 4 commits into
stan-dev:developmentfrom
Uupali:banana-posterior

Conversation

@Uupali

@Uupali Uupali commented Oct 3, 2026

Copy link
Copy Markdown

Adds 3 versions of the twisted Gaussian Banana posterior target distribution from Haario et al. (1999) (Section 5.1), with implementations in both Stan and PyMC.

The target distribution is defined as:

$$y_1 \sim \mathcal{N}(0, \sigma=\sqrt{v}), \quad v = 100$$

$$y_2 \sim \mathcal{N}\left(-b(y_1^2 - v), \sigma=1\right)$$

$$y_{3:D} \sim \mathcal{N}(0, \sigma=1) \quad \text{for } D > 2$$

This is basically a twisted Gaussian distribution.
Paper reference: Haario et al. (1999) - Adaptive proposal distribution for random walk Metropolis algorithm

Posteriors Included

  • banana_2d_moderate-banana: D = 2, b = 0.03
  • banana_2d_strong-banana: D = 2, b = 0.10
  • banana_8d_strong-banana: D = 8, b = 0.10

Changes Included

  • models: added banana.stan and banana.py
  • data: added compressed data JSONs, metadata, and generator scripts in data/data-raw/
  • metadata: added corresponding 'info.json' files for model and data, plus main posterior JSON files.

"https://doi.org/10.1007/s001800050022"
],
"data_file": "data/data/banana_2d_moderate.json",
"references": null,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the reference of the paper here, and in the bibliography.

"https://doi.org/10.1007/s001800050022"
],
"data_file": "data/data/banana_2d_strong.json",
"references": null,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Add the reference to the paper in bibtex

"https://doi.org/10.1007/s001800050022"
],
"data_file": "data/data/banana_8d_strong.json",
"references": null,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here.

"banana",
"twisted_gaussian"
],
"references": null,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See here

@MansMeg

MansMeg commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Great! looks good. However, add the references to the paper also as a reference and then also add the paper in bibtex. Amaybe also fix this for the funnel if we missed to do that there.

@Uupali

Uupali commented Oct 4, 2026

Copy link
Copy Markdown
Author

added for both.

@JTorgander JTorgander left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's merge!

@JTorgander
JTorgander merged commit 7eeabf3 into stan-dev:development Oct 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants