What Equation is model.coef_ Derived From? (SKLearn)
Fairly simple question, but something I've been unable to understand firmly by scouring the interwebs.
After running a LR model using SKlearn, one of the key outputs is coef_
, along with intercept_
.
I understand that coef_
is a transformation matrix that fully describes the relationships of the model; and that performing the dot-product of the input data, with coef_
and adding intercept_
will produce the predicted values for your inputs.
My question is: What is the equation that defines coef_
for a 1st-order model? How does this change with a 2nd-order model? How does this equation change with a multi-variate model that has n-features?
I've gathered that it's something along the lines of b0 + b1x + b2x
, but I don't understand how it evolves with the introduction of additional feature variables and for higher-order polynomial models.
Topic machine-learning-model linear-regression scikit-learn
Category Data Science