Skip to content

Commit

Permalink
minor demo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShantanuKodgirwar committed Oct 31, 2024
1 parent 82d6a99 commit 48c1e18
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pip install geosss
We consider a target that is a mixture of von Mises-Fisher distribution on a 2-sphere with concentration parameter $\kappa=80$. By using $10^3$ samples, our samplers geoSSS (reject) and geoSSS (shrink) (top row) explore all modes, whereas RWMH and HMC (bottom row) get stuck in a single mode.

<p align="center">
<img src="assets/animation_vMF.gif" width="600">
<img src="assets/animation_vMF.gif" width="1000">
</p>

This demo can be created with the below script.
Expand Down
Binary file modified assets/animation_vMF.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 4 additions & 6 deletions scripts/demo_animate_vMF.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def show_sphere(pdf: gs.Distribution, n_grid: int = 1000):
pdfnorm = Normalize(vmin=pdf_vals.min(), vmax=pdf_vals.max())

fig, axes = plt.subplots(
2,
2,
figsize=(10, 10),
1,
len(methods),
figsize=(16, 6),
subplot_kw={"projection": "3d"},
sharex=True,
sharey=True,
Expand All @@ -54,9 +54,7 @@ def show_sphere(pdf: gs.Distribution, n_grid: int = 1000):
ax.axis("off")

# Adjust layout to reduce gaps
plt.subplots_adjust(
wspace=-0.1,
)
plt.subplots_adjust(wspace=-0.1, hspace=-0.2)

return fig, axes

Expand Down

0 comments on commit 48c1e18

Please sign in to comment.