plans for WebStan

52 views
Skip to first unread message

Bob Carpenter

unread,
May 19, 2014, 2:02:03 PM5/19/14
to stan...@googlegroups.com
> I do think that Stan should target people whose computer literacy is limited to Excel or Stata or SPSS or something, but trying to teach them just enough R or Python or Matlab to be able to use RStan or PyStan or MStan is not a good way to target them. We
> need to be giving them models that they can run from a web browser without compiling, can see the print output in the web browser, and read the .csv files into whatever program they know how to use.

I agree.

We'll be taking on Stata over the next couple of
years with Sophia Rabe-Hesketh. The plan is to provide a bunch of
pre-built education models.

No plans for Excel or SPSS yet.

> Hopefully, that will get them hooked enough to where they are willing to learn how to write their own Stan models and compile them.

That'd be nice for a core (R/Py/Cmd)Stan audience.

It'd be great if we could give them a stepping stone that's more
like an iPython Notebook interface than having to install RStan. But
I have no idea how we'd compile the models.

Cutting out the installation's not to be underestimated --- I have
to believe we still lose lots of users out of frustration at that step
judging from the e-mail we do get.

We may also want to consider permanently supporting the users who
are never going to want to define their own models in Stan (or for
bglmer() or for BUGS).

> Today, we could have dozens of popular Stan models running in any web browser by translating the C++ file to javascript with emscripten or compiling the C++ to PNaCL format which will run in Chrome. But we don't have a WebStan interface and don't have any plan to develop one, even though it would be simpler than the interfaces we have already written because WebStan would basically just be a wrapper around CmdStan.

Sounds like you do have a plan! Let's find someone to do it.
If we can fit models client side, that'd be awesome. I hadn't
wanted to build server-side web apps until we had a way to pay for
hosting.

- Bob

Daniel Lee

unread,
May 19, 2014, 2:31:31 PM5/19/14
to stan...@googlegroups.com


I'm assuming the original message was from Andrew.

On Mon, May 19, 2014 at 2:02 PM, Bob Carpenter <ca...@alias-i.com> wrote:
> Today, we could have dozens of popular Stan models running in any web browser by translating the C++ file to javascript with emscripten or compiling the C++ to PNaCL format which will run in Chrome. But we don't have a WebStan interface and don't have any plan to develop one, even though it would be simpler than the interfaces we have already written because WebStan would basically just be a wrapper around CmdStan.

Sounds like you do have a plan!  Let's find someone to do it.
If we can fit models client side, that'd be awesome.  I hadn't
wanted to build server-side web apps until we had a way to pay for
hosting.


Yeah -- I had started down the path and gotten Stan interfaced through Node.js. That's a server-side javascript library. When I felt the pains of that last summer, I knew we had to refactor our interfaces to cut down on the difficulty of implementing Stan in another wrapper. 9 months later and I'm still trying to tame Stan / CmdStan / RStan (well -- not working on that the whole time).

And... we still need to figure out how to pay for hosting.


Ben Goodrich

unread,
May 19, 2014, 2:59:11 PM5/19/14
to stan...@googlegroups.com
On Monday, May 19, 2014 2:02:03 PM UTC-4, Bob Carpenter wrote:
No plans for Excel or SPSS yet.

I don't think we need an Excel or SPSS "plan". We just need a way to generate .csv files and maybe combine them so that they can be read into Excel or SPSS or another spreadsheet-like program.
 
We may also want to consider permanently supporting the users who
are never going to want to define their own models in Stan (or for
bglmer() or for BUGS).

Yes. For my QMSS class, I definitely wanted to get them to the point where they could write the own models in Stan. But it would have been much easier to start with prebuilt, zero-compile, zero-install stuff.
 
> Today, we could have dozens of popular Stan models running in any web browser by translating the C++ file to javascript with emscripten or compiling the C++ to PNaCL format which will run in Chrome. But we don't have a WebStan interface and don't have any plan to develop one, even though it would be simpler than the interfaces we have already written because WebStan would basically just be a wrapper around CmdStan.

Sounds like you do have a plan!  Let's find someone to do it.

I believe the exact extent of my plan was to hire a "12 year old HTML5 speaking little dude" and you volunteered Mitzi. I just don't know how to write web apps but there are millions of people that do. It can't be that hard to take user input and build a call to the Stan model.
 
If we can fit models client side, that'd be awesome.  I hadn't
wanted to build server-side web apps until we had a way to pay for
hosting.

I think client-side would be fine. Or server-side where the server is Amazon's and people can pay for it themselves.

Ben

Bob Carpenter

unread,
May 20, 2014, 12:21:16 PM5/20/14
to stan...@googlegroups.com

On May 19, 2014, at 8:59 PM, Ben Goodrich <goodri...@gmail.com> wrote:

> On Monday, May 19, 2014 2:02:03 PM UTC-4, Bob Carpenter wrote:
> No plans for Excel or SPSS yet.
>
> I don't think we need an Excel or SPSS "plan". We just need a way to generate .csv files and maybe combine them so that they can be read into Excel or SPSS or another spreadsheet-like program.

I see. That we should be able to do.

What do they want as input? Presumably not the chains of
samples.

> I believe the exact extent of my plan was to hire a "12 year old HTML5 speaking little dude" and you volunteered Mitzi. I just don't know how to write web apps but there are millions of people that do. It can't be that hard to take user input and build a call to the Stan model.

There aren't millions of people who know how to do it competently,
as you can see by what's actually out there on the web. Luckily,
Mitzi knows more about web dev than most HTML5 speaking little dudes,
even if she doesn't know HTML5 itself.

I don't think the web infrastructure will be the hard part
unless we want to support a wide range of archaic and/or
marginal browsers. Famous last words, of course.


> If we can fit models client side, that'd be awesome. I hadn't
> wanted to build server-side web apps until we had a way to pay for
> hosting.
>
> I think client-side would be fine. Or server-side where the server is Amazon's and people can pay for it themselves.

That we could do, too. For that, we need some 22-year old
MapReduce and virtual machine speaking medium-sized dude(tte).

- Bob

Ben Goodrich

unread,
May 20, 2014, 12:44:19 PM5/20/14
to stan...@googlegroups.com
On Tuesday, May 20, 2014 12:21:16 PM UTC-4, Bob Carpenter wrote:
> On Monday, May 19, 2014 2:02:03 PM UTC-4, Bob Carpenter wrote:
> No plans for Excel or SPSS yet.
>
> I don't think we need an Excel or SPSS "plan". We just need a way to generate .csv files and maybe combine them so that they can be read into Excel or SPSS or another spreadsheet-like program.

I see.  That we should be able to do.  

What do they want as input?  Presumably not the chains of
samples.

I think there are a lot of people that sadly would be happy to have an Excel file with one chain per worksheet or even one worksheet with the chains stacked and maybe a chain_id variable appended. They write formulas and macros and paste them wherever they are needed. It is horribly inefficient but popular.
 
> I believe the exact extent of my plan was to hire a "12 year old HTML5 speaking little dude" and you volunteered Mitzi. I just don't know how to write web apps but there are millions of people that do. It can't be that hard to take user input and build a call to the Stan model.

There aren't millions of people who know how to do it competently,
as you can see by what's actually out there on the web.  Luckily,
Mitzi knows more about web dev than most HTML5 speaking little dudes,
even if she doesn't know HTML5 itself.

I don't think the web infrastructure will be the hard part
unless we want to support a wide range of archaic and/or
marginal browsers.  Famous last words, of course.

No need to support archaic or marginal browsers. That is one reason why I was thinking to rely on the HTML5 standard, not that WebStan should embed <video> or anything. But we need to translate the CmdStan arguments to web app things like file finders for data and inits, spinboxes for chains and iterations, drop down menus for sampling vs. optimization, tabs to separate the less-used options from the commonly-used options etc.
 
> If we can fit models client side, that'd be awesome.  I hadn't
> wanted to build server-side web apps until we had a way to pay for
> hosting.
>
> I think client-side would be fine. Or server-side where the server is Amazon's and people can pay for it themselves.

That we could do, too.  For that, we need some 22-year old
MapReduce and virtual machine speaking medium-sized dude(tte).

This formerly 22-year old dude provides an AMI with RStudio Server

http://www.louisaslett.com/RStudio_AMI/

and installing RStan is pretty easy (although it doesn't come with clang++ so you have to add that yourself or tolerate a g++ without the latest LTO functionality). If you get decent virtual hardware, that is adequate for doing basic modeling with parallel chains. But if you actually need MapReduce for something, then you probably want to customize your AMI.

Ben

Ben Goodrich

unread,
May 20, 2014, 12:58:51 PM5/20/14
to stan...@googlegroups.com
On Tuesday, May 20, 2014 12:44:19 PM UTC-4, Ben Goodrich wrote:
No need to support archaic or marginal browsers. That is one reason why I was thinking to rely on the HTML5 standard, not that WebStan should embed <video> or anything. But we need to translate the CmdStan arguments to web app things like file finders for data and inits, spinboxes for chains and iterations, drop down menus for sampling vs. optimization, tabs to separate the less-used options from the commonly-used options etc.

Also, I think CmdStan should introduce an optional config argument that would input a file that could have any of the arguments specified but overridden by the corresponding command-line argument if specified. We could generate a dummy file that looks something like

# Uncomment the relevant lines
#
# method sample
## num_samples 1000
## num_warmup  1000
...

That would be useful for anyone who wants to use CmdStan, including interfaces to CmdStan that could parse and regenerate such a file.

Ben

Rob J. Goedman

unread,
May 20, 2014, 2:07:27 PM5/20/14
to stan...@googlegroups.com
That would certainly make picking apart/reading in a samples.csv file easier as well, even though some of that info is already in there as well.

Rob J. Goedman




--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages