# What is the difference between linear and non-linear regression?

In machine learning, I understand that linear regression assumes that parameters or weights in equation should be linear. For Example:

$$y = w_1x_1 + w_2x_2$$

is a linear equation where $$x_1$$ and $$x_2$$ are feature variables and $$w_1$$ and $$w_2$$ are parameters.

Also

$$y = w_1(x_1)^2 + w_2(x_2)^2$$

is also linear as parameters $$w_1$$ and $$w_2$$ are linear with respect to $$y$$.

Now, I read some articles stating that in the equation like

$$y = \log(w_1)x_1 + \log(w_2)x_2$$

can also be made linear by considering other variables $$v_1$$ and $$v_2$$ as:

\begin{align} v_1 &= \log(w_1)\\ v_2 &= \log(w_2) \end{align}

Thus,

$$y = v_1x_1 + v_2x_2$$

So, in this sense, any non-linear equation can be made linear, then what is non-linear regression here? I think I am missing something important here. I am a beginner in the field of Machine Learning. Can somebody help me?

• non-linear regression is that dependent variable values does not depend on the linear combination. We can perform some transformations, like log or any transformation and make them linear. Though not every non linear relationship can be transformed into linear. Also even if we are able to do that.. that might be a complex transformation. – GadaaDhaariGeek Dec 22 '19 at 16:27

$$y = (w_1 x_1 + w_2 x_2)^2 + w_3$$
With such a function to learn, you cannot separate out transformed values of $$w_1$$ and $$w_2$$ and turn this into a linear function of just $$x_1$$ and $$x_2$$.