4.2 ACF features

All the autocorrelations of a series can be considered features of that series. We can also summarise the autocorrelations to produce new features; for example, the sum of the first ten squared autocorrelation coefficients is a useful summary of how much autocorrelation there is in a series, regardless of lag.

We can also compute autocorrelations of transformations of a time series. A useful transformation in this context is to look at changes in the series between periods. That is, we “difference” the data and create a new time series consisting of the differences between consecutive observations. Then we can compute the autocorrelations of this new differenced series.

Occasionally it is useful to apply the same differencing operation again, so we compute the differences of the differences. The autocorrelations of this double differenced series may provide useful information.

Another related approach is to compute seasonal differences of a series. If we had monthly data, for example, we would compute the difference between consecutive Januaries, consecutive Februaries, and so on. This enables us to look at how the series is changing between years, rather than between months. Again, the autocorrelations of the seasonally differenced series may provide useful information.

The feat_acf() function computes a selection of the autocorrelations discussed here. It will return six or seven features:

  • the first autocorrelation coefficient from the original data;
  • the sum of square of the first ten autocorrelation coefficients from the original data;
  • the first autocorrelation coefficient from the differenced data;
  • the sum of square of the first ten autocorrelation coefficients from the differenced data;
  • the first autocorrelation coefficient from the twice differenced data;
  • the sum of square of the first ten autocorrelation coefficients from the twice differenced data;
  • For seasonal data, the autocorrelation coefficient at the first seasonal lag is also returned.

When applied to the Australian tourism data, we get the following output.