stan-dev/stan — pull request #1082 by maverickg (2014-10-13 01:58:42+00:00)
Title: Feature/partial inits (issue #1069)

#### Summary:

Allow to generate initial values randomly for some parameters if not all are specified by a user.

#### Intended Effect:

1. In the case of manually providing initial values, previously a user must specify inits for _all_ parameters. This PR makes it possible to provide inits for some parameters by using random partial inits for other parameters.

2. Provide an option to disable random partial inits

#### How to Verify:

More unit tests are added to `initialize_state_test.cpp`, which can be run as follows. In particular, a new mock model mimics the scenarios where

1. parameters need transformation
2. the number of elements for a parameter in the constrained space is different from that in the unconstrained space

```
$ ./runTests.py src/test/unit/common/initialize_state_test.cpp
```

#### Side Effects:

This PR would break interfaces since two arguments are needed for the new API:

1. to specify the range when partial inits are in a file as in CmdStan
2. to disable random partial inits

So the interfaces such as (Cmd/Py/R)Stan needs to add options and update call of function `initialize_state`.

#### Documentation:

None in the manual.

#### Reviewer Suggestions:

Any