def __init__(self,model,cov=None):
self.model = model<EOL>current = self.model.optimizer_array<EOL>self.D = current.size<EOL>self.chains = []<EOL>if cov is None:<EOL><INDENT>self.cov = np.eye(self.D)<EOL><DEDENT>else:<EOL><INDENT>self.cov = cov<EOL><DEDENT>self.scale = <NUM_LIT>/np.sqrt(self.D)<EOL>self.new_chain(current)<EOL>
Metropolis Hastings, with tunings according to Gelman et al.