In various literature i have seen both being claimed and now i am confused which one is true ?

The one that says linear in terms of weights claims that one can simply add higher order terms for the inputs and still learn non linear models while optimization problem remains linear in terms of weights.

There are other that claim it is linear in terms of inputs.

Can someone clarify on this ?

Following is what is given in Elements of Statistical Learning : enter image description here

Recall that linearity is defined as following. Function $f$ is linear if

$$f(\alpha x+\beta y)=\alpha f(x)+\beta f(y),$$

where $f$, $\alpha,\beta$ and $x,y$ are such that this equation makes sense.

The linear regression model is defined as

$$y_i=\sum_{i=1}^p\alpha_i x_i+\varepsilon_i,$$

which we can write as

$$y_i=f(x_1,...,x_p)+\varepsilon_i=g(x_1,...,x_p,\varepsilon_i).$$

Both $f$ and $g$ are linear functions.

Now the optimisation function for the linear regression is

$$c(\alpha_1,...,\alpha_p)=\sum_{i=1}^n(y_i-f(x_1,...,x_p))^2.$$

It is not a linear function.

Hope this clarifies things a bit.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.