Skip to contents

Formula: xbar_i = (N / n) sum_{j = n(i-1)/N + 1}^{n i / N} x_j.

Usage

Paa(x, N)

Arguments

x

The series, length n.

N

Number of segments, 1 <= N <= n.

Value

List with paa, estimate, segment_width, N, n.

Details

When N divides n this is the mean of each of N equal blocks. When it does not, the sum is over a FRACTIONAL window: the observation straddling a segment boundary contributes to both segments in proportion to the overlap. Truncating instead of splitting is the usual implementation error and it breaks the one property the representation is supposed to have – that the segment means average back to the mean of the series.

References

Keogh, E., Chakrabarti, K., Pazzani, M. & Mehrotra, S. (2001). Dimensionality reduction for fast similarity search in large time series databases. Knowledge and Information Systems, 3(3), 263-286. doi:10.1007/PL00011669

Examples

Paa(x = c(1, 2, 3, 4, 5, 6, 7, 8), N = 5L)
#> $paa
#> [1] 1.375 2.875 4.500 6.125 7.625
#> 
#> $estimate
#> [1] 1.375
#> 
#> $segment_width
#> [1] 1.6
#> 
#> $N
#> [1] 5
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Piecewise aggregate approximation"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"