Nonlinear and other types of regression

Although we have focused on linear regression in this chapter, you certainly are not limited to performing regression with linear formulas. You can model your dependent variable by one or more nonlinear terms such as powers, exponentials, or other transformations on your independent variables. For example, we could model Sales by a polynomial series of TV terms:

Keep in mind, however, that as you add this complexity, you are again putting yourself in danger of overfitting.

In terms of implementing non-linear regressions, you cannot use github.com/sajari/regression, which is limited to linear regression. ...

Get Machine Learning With Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.