Metropolis Hastings MV
An implementation for a multi-variable Metropolis Hasting process. The process is observable at each step
Parameters
the initial value to start generation process
the target function
the proposal function
the stream for accepting or rejecting the proposed state
a list of BatchStatistics one for each dimension that have been configured to collect batch statistics on the dimensions. Default batch statistics are provided.
Constructors
Properties
If true, the stream will automatically participate in having its stream advanced to the next sub-stream via stream managers
Tells the stream to start producing antithetic variates
If true, the stream will automatically participate in having its stream reset to its start stream via stream managers
the underlying stream of random numbers
Functions
Positions the RNG at the beginning of its next substream
Allows the adding (attaching) of an observer to the observable
Returns the average for each dimension based on all observed values, without batching.
Returns a list of batching statistics for each dimension. the observations for each dimension are batched using the default batching algorithm in class BatchStatistic.
Returns how many observers are currently attached to the observable
Detaches all the observers from the observable
Allows the deletion (removing) of an observer from the observable
Resets statistics and sets the initial state to the initial value or to the value found via the burn in period (if the burn in period was run).
Returns true if the observer is already attached
Moves the process one step. If the sampler is not initialized, it will be initialized. If it has already been initialized, it will not be re-initialized.
Causes the process to advance through the number of steps and return the state associated with the last step taken. This allows the sampling to skip the number of steps between returned observations. If the sampler is not initialized, it will be initialized. If it has already been initialized, it will not be re-initialized. This is a convenience method which repeatedly calls the function next() for the specified number of steps.
Returns a list of the statistics collected across every dimension from all the observations without batching.
The resetStartStream method will position the RNG at the beginning of its stream. This is the same location in the stream as assigned when the RNG was created and initialized.
Resets the position of the RNG at the start of the current substream
Resets the automatically collected statistics
The state of the sampler is initialized before running all the steps.
Runs a warmup period and assigns the initial value of the process to the last value from the warmup process.
Fills the supplied array with a sample of values. This method avoids the creation of a new array. The size of the array must match dimension
Fills the supplied array of arrays with randomly generated samples
Generates a list holding the randomly generated arrays of the given dimension. Thus, the elements of the list are the arrays holding the sampled values.
Generates a sample by columns of values. The returned array will hold arrays of values, with each element being an array of size sampleSize. That is a 2-D array with nRows = dimension and nColumns = sample size
Assigns the stream associated with the supplied number from the default RNStreamProvider