def propose(self): tau = 1./(self.adaptive_scale_factor * self.proposal_sd)**2 time = pymc.rnormal(self.stochastic.value.time, tau) n = pymc.rnormal(len(self.stochastic.value), tau) if n <= 0: n = 0 times = [rand.random() for _ in range(n)] total = float(sum(times)) times = [item*time/total for item in times] events = [_Survival._event(time=item, censored=False) for item in times] events = numpy.array(events) self.stochastic.value = _Survival._multiEvent(events)
def propose(self): tau = 1./(self.adaptive_scale_factor * self.proposal_sd)**2 time = pymc.rnormal(self.stochastic.value.time, tau) censored = rand.random() > 0.5 self.stochastic.value = _Survival._event(time, censored)