0
$\begingroup$

I have seen several examples of people performing bayesian linear regression in python packages such as stan or pymc3 where they have the parameters/distributions as exponents w.r.t the variables.

e.g

def transform(x, ec, slope):
    return 1 / (1 + (x / ec)**(-slope))

Where slope follows lets say an normal distribution with some mean and sd. This is clearly not linear w.r.t to the parameters and i am wondering how it is possible that we can derive the posterior from this since bayesian linear regression assumes linearity w.r.t to parameters?

I have clearly missed an vital and basic part of bayesian linear regression.

Can someone point it out?

$\endgroup$
4
  • $\begingroup$ The function may not be linear in its parameters, but so long as the function is differentiable in those parameters (autograd makes this simple) and we specify a likelihood, packages like Stan and Pymc can do the necessary computations. $\endgroup$ Aug 3 at 22:39
  • $\begingroup$ youre right, that's an example of a nonlinear Bayesian regression. $\endgroup$ Aug 3 at 22:59
  • $\begingroup$ ah i see. Never heard of it before and googling it doesnt really help. Seems like a commong case so seems strange, the same tutorials utilizing functions like the one in the post also calls it bayesian linear regression. Does anyone of you have any material or tutorials on this? $\endgroup$ Aug 3 at 23:49
  • $\begingroup$ how does it work on the inside in general in these packages tackling this? do they log the exponents or such $\endgroup$ Aug 3 at 23:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.