Exemple #1
0
import pymc
import numpy as np

true_mu = -0.1
true_kappa = 50.0
N_samples = 500

mu = pymc.Uniform('mu', lower=-np.pi, upper=np.pi)
kappa = pymc.Uniform('kappa', lower=0.0, upper=100.0)


data = pymc.rvon_mises( true_mu, true_kappa, size=(N_samples,) )
y = pymc.VonMises('y',mu, kappa, value=data, observed=True)x
 def propose(self):
     t_p = pm.rvon_mises(0, 1./self.adaptive_scale_factor)
     i_p = np.random.randint(self.o.n-1)
     j_p = np.random.randint(i_p+1, self.o.n)
     
     self.o.value = fast_givens(self.o.value, i_p, j_p, t_p)
Exemple #3
0
import pymc
import numpy as np

true_mu = -0.1
true_kappa = 50.0
N_samples = 500

mu = pymc.Uniform('mu', lower=-np.pi, upper=np.pi)
kappa = pymc.Uniform('kappa', lower=0.0, upper=100.0)


data = pymc.rvon_mises( true_mu, true_kappa, size=(N_samples,) )
y = pymc.VonMises('y',mu, kappa, value=data, observed=True)