Description Usage Arguments Details Value
This is a factory that creates a random walk normal distribution that adds some noise to the provided values, subject to an indicator constraint.
1 | rtnorm_rw_fac(indicator, sd = 1, fraction = 0.97)
|
indicator |
an indicator function that takes a matrix and return a boolean vector, each element of which corresponds to a column of the input matrix, indicating its feasibility . (num mat -> bool vec) |
sd |
the "standard deviation" of the normal distribution at the first
iteration, that is when |
fraction |
the percentage of "standard deviation" (relative to the previous iteration) left after each iteration. (num) |
This factory essentially creates a rejection sampler that samples from a truncated normal distribution.
This proposal is designed to decrease after each iteration. The default option is to decrese 3 percentage from the "standard deviation" at the previous iteration. The "standard deviation" mentioned in this section refers to the standard deviation of the untruncated normal random walk, not the actual standard deviation of the proposal distribution.
a function that takes a matrix of current states (each column corresponds to a state) (num mat) and the current iteration count (num), and produces a matrix of proposed states (num mat).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.