In this notebook from Bayesian Methods for Hackers, they create a Deterministic variable from a python function as such:
# from code line 9 in the notebook
@pm.deterministic
def lambda_(tau=tau, lambda_1=lambda_1, lambda_2=lambda_2):
out = np.zeros(n_count_data)
out[:tau] = lambda_1 # lambda before tau is lambda1
out[tau:] = lambda_2 # lambda after (and including) tau is lambda2
return out
I'm trying to recreate this experiment almost exactly, but apparently @pm.deterministic
is not a thing in pymc3. Any idea how I would do this in pymc3?