0
$\begingroup$

I am trying to code multivariate polynomial regression from scratch and I got confused about how interaction terms work. I saw that a polynomial regression with 2 inputs and with interaction terms should look like this: ax^2 + bz^2 + cxz + dx + ez + f, where a,b,c,d,e,f are the model's parameters and x,z are the inputs. But how would this equation look with 3 inputs? Would there be an interaction term with all three inputs axyz (a is a parameter)?

$\endgroup$
1
  • $\begingroup$ Do you just want squaring, or with the third term, so you also want terms raised to the third power? // You kind of get to pick what you want. If you just want to tack on a $+y$ term and can justify why, go for it. $\endgroup$
    – Dave
    May 5, 2023 at 13:49

0

You must log in to answer this question.

Browse other questions tagged .