@@ -68,9 +68,9 @@ def eppesupdate(theta, mu, w, sig, n, w00=None, maxn=0, maxsteprel=None):
68
68
:param w: The accuracy of mu as a covariance matrix
69
69
:param sig: Covariance parameter
70
70
:param n: The accuracy of sig as imaginary observations
71
- :param w00: Optimal minimal w00
72
- :param maxn: Optimal maximum n
73
- :param maxsteprel: Optimal maximum relative change in mu
71
+ :param w00: Optional minimal w00
72
+ :param maxn: Optional maximum n
73
+ :param maxsteprel: Optional maximum relative change in mu
74
74
:return: mu_new, w_new, sig_new, n_new updated parameters
75
75
76
76
"""
@@ -98,12 +98,12 @@ def eppesupdate(theta, mu, w, sig, n, w00=None, maxn=0, maxsteprel=None):
98
98
99
99
def propose (nsample , mu , sig , bounds = None , maxtry = 1000 ):
100
100
"""Propose new sample given mu, sig and bounds.
101
- :param nsample:
102
- :param mu:
103
- :param sig:
104
- :param bounds:
105
- :param maxtry:
106
- :return:
101
+ :param nsample: How many parameter vector to propose
102
+ :param mu: Mean of the proposal
103
+ :param sig: Covariance matrix for the proposal
104
+ :param bounds: Optional upper and lower bounds
105
+ :param maxtry: Optional maximum tries for the bounded value
106
+ :return: sample of size nsample * npar, where npar = len(mu)
107
107
"""
108
108
x = np .random .multivariate_normal (mu , sig , size = nsample )
109
109
# no check on bounds
@@ -239,9 +239,9 @@ def tomatrix(x):
239
239
240
240
241
241
# do not use this
242
- def logpropose (nsample , mu , sig , bounds = [], maxtry = 1000 ):
242
+ def _logpropose (nsample , mu , sig , bounds = [], maxtry = 1000 ):
243
243
"""Propose new sample given sample mu, sig and bounds, using logN """
244
- mus = log (mu )
244
+ mus = np . log (mu )
245
245
sigs = sig / np .outer (mu , mu )
246
246
x = np .exp (np .random .multivariate_normal (mus , sigs , size = nsample ))
247
247
# no check on bounds
0 commit comments