From the course: Practical Python for Time Series Analysis

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Transform features with rolling windows

Transform features with rolling windows - Python Tutorial

From the course: Practical Python for Time Series Analysis

Transform features with rolling windows

- [Instructor] Rolling windows. You see the new column CPI_roll, which is a calculation that it's reflected on this figure. Look at the bottom charts with progression on the left, the baseline, the one we had calculated earlier with the aggregation of granularity reduction and the discretization of the categorical column, the periods. On the right, we've got the one applying the rolling, which is the new column that we calculate applying a rolling average. And because of that, we can even get a better Ali Square values where we see 86%. That's a significant increase in the period after, although we are falling short in the other periods. There are some handicaps. However, please notice that the shape of the curve may be a more exponential sometimes, but the point of this lecture is that if you transform the explanatory variables, you may get higher results and sometimes they may make sense, other times, they don't.…

Contents