I'll admit the new command structure is rather quirky and
will take some getting used to.
Overall, 2.0 still has an efficiency issue we haven't resolved
despite working on it all weekend. More on that later, but
we may just "unrelease" 2.0 in the coming week if we can't
sort it out.
More on how the command line's supposed to work below.
On 10/20/13 6:56 PM, Sergio Polini wrote:
> Two issues: the help pages are a bit confusing (to me, at least), and I can't understand how to set controls.
>
> 1. The stan() help page says that there is a "control" parameter that can be used to set adaptation parameters. "In
> addition, Depending on which algorithm is specified, different parameters can be set as in Stan for sampling. For
> algorithm HMC [...] we can set 1. int_time [...] 2. stepsize [...] 3. stepsize_jitter [...] For algorithm NUTS, we can
> set 1. metric [...] 2. max_treedepth etc."
> It looks as if max_treedepth _and_ metric cannot be set for static HMC. However, when using command-line Stan, if I try:
>
> ./bernoulli sample algorithm=hmc engine=static \
> metric=unit_e max_depth=12 data file=bernoulli.data.R
Static HMC has an integration time, whereas NUTS has max_depth
parameter. Both allow metric, stepsize and stepsize_jitter.
> I get an error message: "max_depth=12 is either mistyped or misplaced."
Right. No max_depth parameter for engine=static. Look at
figure 4.4.
> Just max_depth!
> But if I try:
>
> ./bernoulli sample algorithm=hmc engine=static metric=unit_e \
> data file=bernoulli.data.R
>
> there's no problem. (No apparent problem at least.)
Right. metric=unit_e is a valid subargument for algorithm=hmc.
> Looking at the Manual, I read that "command skeleton for invoking the basic Hamiltonian Monte Carlo Sampler (HMC) [...]
> is the same as the NUTS command skeleton shown in Figure 4.3 other than for the engine" (Figure 4.4) and there is
> "[metric={unit_e,diag_e,dense_e}]" too, but pag. 48 says that static HMC can have just one valid subargument: int_time.
The indentation in the diagrams indicates scope. So
metric is a subargument of algorithm=hmc, whereas int_time is a subargument
of engine=static.
> 2. The "control" parameter should be a named list. AFAIK, a named list is something like "list(adapt_delta = 0.6,
> adapt_t0 = 12)" but I'm not able to get it working.
I'm not sure how this is all configured in RStan, so
I'll leave this for someone else to answer.
...snip...
- Bob