4

Is there a way to access the trace of the likelihood in pymc? I declare the likelihood as:

@pymc.observed
def likelihood(value=1, data=data, model=model):
    chi2 = 0.0
    [...]
    return np.exp(-chi2/2.0)

But if I attempt the give the following arguments (as one would do for deterministic and stochastic variables):

@pymc.observed(plot=False, trace=True, name='likelihood')

It does not appear in the list of the traces.

Am I missing something? How to recover the values of "likelihood"?

Waribiki
  • 113
  • 5
  • 2
    Hi, a hack probably is to create a dummy deterministic variable which returns the same value as the `likelihood` function you defined. – altroware Jul 31 '17 at 10:46

0 Answers0