Skip to content

Latest commit

 

History

History
112 lines (60 loc) · 4.06 KB

README.md

File metadata and controls

112 lines (60 loc) · 4.06 KB

Stan distributions

A web app to visualize distributions in Stan. It uses Stan Math C++ code to evaluate the log probability density/mass functions. The Stan Math C++ is compiled to Webassembly using Emscripten. d3.js is used for visualizations.

This was inspired by the distribution zoo. The main differences of this approach are:

  • it runs entirely in the user's browser and does not require a server (very easy to fork and deploy your own custom version),
  • it uses the actual Stan C++ for all density/mass functions (Distribution zoo is based on R distribution implementations).

This currently supports the majority of Stan's univariate continuous distributions. Missing discrete distributions will be added shortly.

Links

Unbounded Continuous Distributions

Positive Continuous Distributions

Positive Lower-Bounded Distributions

Continuous Distributions on [0, 1]

Circular Distributions

Bounded Continuous Distributions

Unbounded Discrete Distributions

Custom distributions

Contributed by @noejn2.

Running it locally

  1. Clone the repository
git clone https://github.com/rok-cesnovar/stan-distributions/
  1. Start a simple Python server

This is required in order to serve the .wasm files. The actual computation still happens in the browser.

python3 -m http.server 8000
  1. Open localhost:8000 in your favorite browser. Change the port number in step 2 if needed.