Blogs/Non-Linear Regression

Non-Linear Regression

peter.washington Jul 15 2021 1 min read 45 views

Stanford applied ML PhD

Fundamentals Linear Algebra
Non-Linear Regression.png

What if the x and y variables don’t have a linear relationship? For example, let’s say we want to build a regression model that lets us predict the population of a certain city at a certain time in the future. We were measuring the population every year for the past 5 years, and we plot our data:

Non-Linear Regression

Visualizing the data, it looks like it may follow an exponential pattern. Instead of fitting a line y = mx + b, let’s fit an exponential formula with 3 parameters a, b, and c:

Non-Linear Regression

We proceed with gradient descent as we did before, except we now calculate ∂y/∂a, ∂y/∂b, and ∂y/∂c, and update the values of a, b, and c accordingly.

After the gradient descent process, we end up with the following curve of best fit:

Non-Linear Regression

 

Learn and practice this concept here: 

https://mlpro.io/problems/linear-regression-coefficients/