Skip to content
Snippets Groups Projects
Commit 710548fa authored by Hu Zhao's avatar Hu Zhao
Browse files

docs: change doc string of sample function

parent 7bcd40ef
No related branches found
No related tags found
No related merge requests found
...@@ -136,8 +136,8 @@ class MetropolisHastings: ...@@ -136,8 +136,8 @@ class MetropolisHastings:
mh_accept : numpy array mh_accept : numpy array
An array of shape (nsamples,). Each element indicates whether the An array of shape (nsamples,). Each element indicates whether the
corresponding sample is the proposed new state (value 1) or the old corresponding sample is the proposed new state (value 1) or the old
state (value 0). `np.sum(mh_accept)/len(mh_accept)` thus gives the state (value 0). `np.mean(mh_accept)` thus gives the overall
overall acceptance rate. acceptance rate.
""" """
if (self.target is None) and (self.ln_target is None): if (self.target is None) and (self.ln_target is None):
raise ValueError( raise ValueError(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment