Rev Language Reference


HillClimber - Hill-Climber analysis object

The HillClimber analysis object keeps a model and the associated moves and monitors. The object is used to run Markov chain Monte Carlo (HillClimber) simulation on the model, using the provided moves, to obtain a sample of the posterior probability distribution. During the analysis, the monitors are responsible for sampling model parameters of interest.

Usage

HillClimber(Model model, Monitor[] monitors, Move[] moves, String moveschedule)

Arguments

model : Model (pass by value)
The model graph.
monitors : Monitor[] (pass by value)
The monitors used for this analysis.
moves : Move[] (pass by value)
The moves used for this analysis.
moveschedule : String (pass by value)
The strategy how the moves are used.
Default : random
Options : sequential|random|single

Details

The HillClimber analysis object produced by a call to this function keeps copies of the model and the associated moves and monitors. The HillClimber analysis object is used to run Markov chain Monte Carlo (HillClimber) simulation on the model, using the provided moves, to obtain a sample of the posterior probability distribution. During the analysis, the monitors are responsible for sampling model parameters of interest.

Example

# Create a simple model (unclamped)
a ~ exponential(1)
mymodel = model(a)

# Create a move vector and a monitor vector
moves[1] = mvScale(a, lambda=1.0, weight=1.0)
monitors[1] = mnFile(a,"output/out.log")

# Create an HillClimber object
myHillClimberObject = HillClimber( mymodel, monitors, moves)

# Run a short analysis
myHillClimberObject.burnin( generations = 400, tuningInterval = 100)
myHillClimberObject.run( generations = 400)

# print the summary of the operators (now tuned)
myHillClimberObject.operatorSummary()

Methods

See Also