Hi,
I’ve got this exponential regression model that’s working quite good:
def exponential_regression(x, y):
model = pm.Model()
with model:
sigma = pm.HalfCauchy('sigma', beta = 10, testval = 1.)
alpha = pm.Normal('alpha', 0, sd = 20)
beta = pm.Normal('beta', 0, sd = 20)
likelihood = pm.Normal('y',
mu = alpha * pm.math.exp(-beta * x),
sd = sigma,
observed = y)
trace = pm.sample()
return trace
Now, in my training data, I have access to a third variable that I want to use to weight the entire regression. This term will not be available when predicting.
And this is where I’m stuck, especially since it’s an exponential model. If it was part of a normal LM I’d do y = alpha + beta0 * x + beta1 * z