Polynomial Regression and Parameter Orders

Given that we have a polynomial, y = w1x1 + w2x2 ^2 + w3*x3 ^3…, does the order of parameters matter? For instance, in the housing price model, x1 could be number of beds and x2 could be age of the house. But in another model, it could be reversed. So x1 could be the age of the house and x2 could be number of beds in the second model.

My understanding is that the order does not matter because ‘w’ terms will be adjusted during gradient descent? Is this right?

Hello @kuraaku

Welcome to our community.

x1,x2,x3,…,xn are just representative names for the input features.

What really matters is the column of data (from X) that you pass on to the model. If you pass the 2nd column which stands for #bedrooms as x1, then w1 will be the weight that corresponds to bedroom. Likewise, if you pass the 4th column which stands for age of house as x2, then w2 will be the weight that corresponds to age of house.

The ordering doesn’t matter because all weights are updated simultaneously, and no weight is treated differently because of the value of its subscript.