Why non-linear regression?

We’ve already seen that we can fit even a non-linear polynomial through data points using linear regression if the function to be approximated was linear in parameters. However, in some cases, linear regression may not fit the data well. In such a case, non-linear regression is preferred. For instance, in a classification problem where the targets are classes (or categories), we may be interested in predicting the probability distribution, bounded between 00 and 11, over all the classes for a given input. If the probability of a class, cc, is p(y^i=cxi)=fw(xi)p(\hat y_i=c|\bold{x_i})=f_\bold{w}(\bold{x_i}), then it’s hard to come up with a function, fwf_\bold{w}, that’s linear with respect to w\bold{w}. The figure below is a pictorial example of such a case, where the number of classes is three and we have to employ non-linear regression to find their probability distribution.

Get hands-on with 1400+ tech skills courses.