#NEWLINE# def main( ) : #NEWLINE# #INDENT# Sigma = eye ( 2 ) #NEWLINE# Sigma [ ( 0 , 0 ) ] = 30 #NEWLINE# Sigma [ ( 1 , 1 ) ] = 1 #NEWLINE# theta = ( ( - pi ) / 4 ) #NEWLINE# U = MatrixTools . rotation_matrix ( theta ) #NEWLINE# Sigma = U . T . dot ( Sigma ) . dot ( U ) #NEWLINE# gaussian = Gaussian ( Sigma = Sigma ) #NEWLINE# distribution = GaussianFullConditionals ( gaussian , [ 0.0 , 0.0 ] ) #NEWLINE# mcmc_sampler = Gibbs ( distribution ) #NEWLINE# start = zeros ( distribution . dimension ) #NEWLINE# mcmc_params = MCMCParams ( start = start , num_iterations = 20000 ) #NEWLINE# chain = MCMCChain ( Sigma , mcmc_params ) #NEWLINE# chain . append_mcmc_output ( StatisticsOutput ( plot_times = True , lag = 100 ) ) #NEWLINE# chain . append_mcmc_output ( PlottingOutput ( distribution = gaussian , plot_from = 1 , colour_by_likelihood = False , num_samples_plot = 0 , lag = 100 ) ) #NEWLINE# chain . run ( )