Example 2 – exponential regression

Another common trend in continuous data patterns is exponential growth, which is also commonly seen as exponential decay. In exponential growth, a future value is proportionally related to the current value. The general formula for this type of growth can be written as:

y = y0 (1 + r) x

Where y0 is the quantity's initial value (when x = 0), and r is the growth rate of the quantity.

For instance, if you are investing money in the stock market and expect a 5% rate of return per year (r = 0.05) with an initial investment of $10,000, after five years you can expect $12,763. The exponential growth formula applies here because the amount of money you have next year is proportionally related to the amount of money ...

Get Hands-on Machine Learning with JavaScript 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.