0

Assume three features: $x_1,x_2,x_3,$ and a continuous label $y.$ I want to use pymc in python to fit a Bayesian linear regression based on training samples. I was asked for two questions:

  1. At what $x_3$, $y$ is a maximum?
  2. Provide a distribution of this $x_3$ (that maximizes $y$).

For 1, I understand as we should first fix the left features say $x_1 = 1, x_2 = 2.$ Then numerically find $x_3$ to maximize the mean of posterior distribution: $m(x_3) = E[y|x_1=1,x_2=2,x_3].$

I am not familiar with pymc,

  1. how do we call the above posterior distribution $P(y|x_1=1,x_2=2,x_3)$?
  2. is pm.plot_posterior the expected distribution for question 2?

I doubt that here maximum is the maximum of probability i.e. MAP estimation or it seems not easy to solve.

user6703592
  • 127
  • 5
  • [What is your model?](https://www.amazon.com/dp/B0BTNVFR65) – Romke Bontekoe May 01 '23 at 11:47
  • What do you mean with your first question? Are you looking for the specific _value_ of $x_{3}$ that is associated with the maximum value of $y$? If so, that is much less a regression problem than a sorting problem. – Durden Jun 27 '23 at 00:00

0 Answers0