Sometimes when we created time, lot of our variable, we see a plot like this.
That is the overall trend in our variable is non-linear.
For example, if you have product sales data and your product suddenly goes viral, it will show exponential
growth as compared to linear growth.
But the problem is that a lot of our forecasting models do not work well when there is a nonlinear trend.
Although we haven't started discussing models yet, I'm covering this topic now because power transformation
is also a step we take during data processing.
Some models may not require it, but some models do.
And the concept is very simple.
Let me show you what our transformation is.
So suppose you had these values of the variable and when we plotted, we see a line just like this.
Clearly, this is not a linear trend.
So you use your knowledge of mathematical functions.
And guess what this function looks like?
For example, this particular graph looks like an exponential function.
So the concept here, a simple sense, these values of the variable show exponential trend.
If you take a log of these values, those values will then show linear trend.
And on the right is a plot of logged values.
You can clearly see that this plot is more linear.
So we can use these logged values in our model for forecasting.
Similarly, data can have quadratic logarithmic or any polynomial distribution.
If you sense such a relationship, convert the values correspondingly so that you get a more lenient
thing.
Again, this is not a mandatory step for forecasting models.
Only some models perform better if the trend is linear.
When we discuss models, I will highlight which are those models with power transformation can help
improve the predictions.