You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: paper/paper.md
+29-13Lines changed: 29 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,9 +49,8 @@ working C++17 development environment installed in order to use Stan.
49
49
This requirement can be difficult to satisfy for users from less technical backgrounds or with
50
50
IT-imposed constraints on their systems. Installation-related questions are
51
51
ubiquitous on the Stan forums. This can be a particular pain point in learning environments,
52
-
where instructors do not
53
-
want to spend a substantial fraction of their teaching time ensuring students have a working
54
-
environment and copy of the relevant data and models.
52
+
where instructors do not want to spend a substantial fraction of their teaching time just to ensure
53
+
students have a working environment and copy of the relevant data and models.
55
54
56
55
Thanks to its browser-based design requiring no installation, Stan Playground allows users
57
56
to immediately focus on the issues of modeling and analysis that matter to them.
@@ -63,7 +62,7 @@ immediately, regardless of their local system configuration.
63
62
A similar level of convenience could be achieved by performing both compilation and sampling on
64
63
centrally provided server, but there are several issues with this approach.
65
64
Sampling involves executing user-written code that could perform potentially-unbounded amounts of
66
-
compute. Offering this as a public server would require authentication or rate-limiting.
65
+
compute. Offering this as a public service would require authentication or rate-limiting.
67
66
Additionally, even in a restricted language like Stan, one would have to take serious precautions before
68
67
allowing untrusted user code to run unchecked.
69
68
@@ -77,30 +76,48 @@ technical, process into loading a web page in any modern browser.
77
76
78
77
# Key features
79
78
80
-
<!-- screenshot -->
81
-
82
79

83
80
81
+
Stan Playground provides many features to allow end-to-end analysis projects to be completed in
82
+
the browser.
83
+
84
+
1.**Data Preparation**. The input data for the Stan model can be provided manually as JSON or
85
+
generated by Python or R scripts which can download existing datasets or dynamically generate fake data.
86
+
87
+
2.**Model Editing**. The Stan editor in Stan Playground features integration with the Stan compiler
88
+
to provide on-the-fly diagnostics and formatting.
84
89
85
-
- data generation
86
-
- model editing (with diagnostics etc), compilation, sampling
87
-
- downstream analysis
88
-
- sharing features
89
-
- user compilation server
90
+
3.**Compilation**. A premier feature of Stan Playground is the ability to compile and run without
91
+
needing additional tools installed. This is achieved through a server that handles this compilation
92
+
and provides WebAssembly modules back to the client. While a public server is hosted by the Flatiron Institute,
93
+
users can also run their own and connect to that instead in the settings UI.
90
94
95
+
4.**Sampling**. User can control the key parameters for the sampling algorithm (number of iterations, etc) and
96
+
monitor progress in real time.
97
+
98
+
5.**Posterior Analysis**. Stan Playground provides many built-in diagnostics and visualizations for the
99
+
posterior sample. Additionally, users can write Python or R scripts to leverage the existing ecosystem of
100
+
tools such as ArviZ [@Kumar_ArviZ_a_unified] or `posterior`[@posterior2025].
101
+
102
+
6.**Sharing and Export**. Stan Playground by default saves your analysis in browser local storage.
103
+
For longer-term storage, users can export their projects to zip files for local use, or upload
104
+
to a Github Gist. Github Gist links facilitate easy sharing, as they can be used in URL parameters
105
+
to load a specific project when a link is clicked. More customizable sharing options are also available
106
+
through URL parameters.
91
107
92
108
# Examples
93
109
94
110
Stan Playground provides several example programs on the left
95
111
sidebar of the home page at various levels of complexity, spanning from a basic
96
112
linear regression on fake data to
97
113
[a reimplementation of the model and analysis](https://stan-playground.flatironinstitute.org/?project=https://gist.github.com/WardBrian/d8ab811b137085f154b6145d3c36cbc4)
98
-
from @Carpenter2018.
114
+
from @Carpenter2018. The above link uses Stan Playground's sharing features to pre-populate the project on page load.
99
115
100
116
# Implementation details
101
117
102
118
Stan Playground consists of two components. The first is a server that can compile Stan
103
119
models to WebAssembly, implemented in Python and leveraging the existing Emscripten toolchain [@emscripten2011].
120
+
This server is also published as a [Docker](https://www.docker.com/) image if users wish to run their own local copy.
104
121
105
122
The remainder of the project is the user-facing web application, which can be found at
0 commit comments