Trend analysis and change point techniques: a survey
 3.5k Downloads
 1 Citations
Abstract
Trend analysis and change point detection in a time series are frequent analysis tools. Change point detection is the identification of abrupt variation in the process behavior due to distributional or structural changes, whereas trend can be defined as estimation of gradual departure from past norms. We examine four different change point detection methods which, by virtue of current literature, appear to be the most widely used and the newest algorithms. They are Wild Binary Segmentation, EAgglomerative algorithm for change point, Iterative Robust Detection method and Bayesian Analysis of Change Points. We measure the power and accuracy of these current methods using simulated data. We draw comparisons on the functionality and usefulness of each method. We also analyze the data in the presence of trend, using Mann–Kendall and Cox–Stuart methods together with the change point algorithms, in order to evaluate whether presence of trend affects change point or vice versa.
Keywords
Change point analysis Trend analysis LO(W)ESS1 Introduction
Trend analysis is defined as a process of estimating gradual change in future events from past data. Different parametric and nonparametric techniques are used to estimate trends. The Mann–Kendall, Spearman rho, seasonal Kendall, the Sen’s t, and Cox–Stuart are the most widely used methods (Hamed 2008; Hessa et al. 2001; Partal and Kahya 2006; Yue et al. 2002). We have focused on the Cox–Stuart and Mann–Kendall to estimate trend. Abrupt or gradual changes exist together. For example, in hydrological data, if there is a sudden release of water from an impoundment followed by a return to a prior regime, it appears as if the sharp downward trend may be misinterpreted as a series of change points. We found only a few references to analysis of combined change point and trend (Xiong and Guo 2004). Analyzing only change point and overlooking trend or vice versa may mislead the calculation. It could be possible that the trend masks abrupt change. For example, estimating trend alone could imply that the trend is either increasing or decreasing. This concern is answered when both change point and trend are analyzed together. Analyzing both possibilities can make improved prediction for future events.
The remainder of this paper is organized as follows. Section 2 reviews existing change point methods, used for our experiments. Section 3 focuses methods used, Sect. 4 shows the simulation results of each method, Sect. 5 emphasizes on trend and change point interaction, and Sect. 6 provides conclusions.
2 Review of existing methods
2.1 EAgglomerative
This algorithm is used to detect multiple change points in data set. It is able to detect numbers and location of change points, and it is considered as computationally efficient (Matteson and James 2013). The number of change points is estimated based on “goodness of fit” of clusters in the data set. The R package, “ecp,” is available to calculate number of change points (James and Matteson 2013). In ecp, two different methods, EDivisive and EAgglomerative algorithms, are provided for univariate as well as multivariate data. Divisive methods estimate change points using a bisection algorithm, whereas agglomerative methods detect abrupt change using agglomeration (James and Matteson 2013). According to Matteson, the agglomerative approach is preferable to the divisive approach (Matteson and James 2013).
2.2 Wild Binary Segmentation (WBS)
This change point detection method claims to detect the exact number and potential locations of change points with no prior assumptions. The R package, WBS, is available with two methods, Standard Binary Segmentation (SBS) and Wild Binary Segmentation (WBS). According to Fryzlewicz (Baranowski and Fryzlewicz 2014), WBS overcomes the problems of the binary segmentation technique and is an improvement in terms of computation. It uses the idea of computing Cumulative Sum (CUSUM) from randomly drawn intervals considering the largest CUSUMs to be the first change point candidate to test against the stopping criteria (Fryzlewicz 2013). This process is repeated for all the samples.
2.3 Bayesian analysis of change points (BCP)
This algorithm works on a product partition model and computes the change point based on data and current partition. Tuning parameter values are provided for accurate analysis of change points (Erdman and Emerson 2007). The Markov chain Monte Carlo (MCMC) implementation of Bayesian analysis can be completed in O(n ^{2}) time. We used the R package, “bcp,” for our experiments (Erdman and Emerson 2007).
2.4 Robust detection of change point
This methods works well when outliers are present, but it prompts possible false alarms as it works on “hierarchical binary splitting” techniques. Least square regression does not perform well in the presence of outliers. However, robust detection overcomes that problem (GerardMerchant et al. 2008). There is no R package available; so, we ran Iterative Robust Detection method using a Python implementation, provided by Stooksbury (GerardMerchant et al. 2008).
3 Materials and methods
4 Experimental results
 Simulation 1: Data points are generated usingwhere ε is a noise with varying µ value and constant σ ^{2}. A change point is inserted at steps 100 (µ = 1.5, σ ^{2} = 1.5), 200 (µ = 2.5 and σ ^{2} = 1.5), 300 (µ = 1, σ ^{2} = 1.5), 200 (µ = 2.5, σ ^{2} = 1.5), and 200 (µ = 1.5, σ ^{2} = 1.5), and the locations of change points are 100, 300, 600, 800, and 1000.$$ y\left( t \right) = 0.7y\left( {t  1} \right)  0.4y\left( {t  2} \right) + \varepsilon $$(3)
Change in mean
Method  Locations 

(a) Change point locations  
WBS  99, 299, 601, 808 
Divisive  
α = 1  100, 300, 602, 809 
α = 2  100, 300, 602, 809 
BCP  99, 298, 601, 808 
Robust detection  100, 300, 602, 808 
Method  10 %  25 %  Missed  Extra  Time (s) 

(b) Results from 100 iterations  
WBS  67  97  8  1  32.53 
Divisive  
α = 1  70  91  11  10  
α = 2  72  92  7  5  36,769.08 
BCP  80  100  10  80  270.53 

Simulation 2: A change point is added at every 250 steps between 1 and 1000. Finally, noise with mean 0 and variance 4 is added. The change points are at steps 250, 500, and 750.
Step data with constant mean and variance
Method  Locations 

(a) Change point locations  
WBS  250, 501, 758 
Divisive  
α = 1  251, 502, 759 
α = 2  251, 502, 759 
BCP  240, 501, 752 
Robust detection  250, 501, 758 
Method  10 %  25 %  Missed  Extra  Time(s) 

(b) Results from 100 iterations  
WBS  86  98  22  10  35.78 
Divisive  
α = 1  84  97  4  5  27,350.66 
α = 2  85  98  3  4  
BCP  80  87  33  27  267.2 

Simulation 3: In this test, data points are generated, from Eq. (3). A change point is added at 200, 300, 400, and 100 steps. The noise is added with mean 0 and different variance at steps 200 (µ = 1.5 and σ ^{2} = 2.5), 300 (µ = 1.5, σ ^{2} = 3.5), 400 (µ = 1.5, σ ^{2} = 4.5), and 100 (µ = 1.5, σ ^{2} = 5.5), and locations are 200, 500, 900, and 1000.
Change in variance
Method  Locations 

(a) Change point locations  
WBS  No change point detected 
Divisive  
α = 1  574 
α = 2  No change point detected 
BCP  No change point detected 
Robust detection  No change point detected 
Method  10 %  25 %  Missed  Extra  Time (s) 

(b) Results from 100 iterations  
WBS  8  20  81  59  32.71 
Divisive  
α = 1  4  10  99  4  14,009.17 
α = 2  1  2  11  6  
BCP  NA  NA  NA  NA  221.1 
 Simulation 4: In this test, data points are generated using Eq. 4 where w is randomly generated data and ε is noise with σ ^{2} 0.8.$$ y\left( t \right) = sin\left( w \right) + \varepsilon $$(4)
Sine wave data
Method  Locations 

(a) Change point locations  
WBS  261, 501, 749 
Divisive  
α = 1  262, 502, 750 
α = 2  262, 500, 749 
BCP  262, 500, 749 
Robust detection  No change point detected 
Method  10 %  25 %  Missed  Extra  Time (s) 

(b) Results from 100 iterations  
WBS  83  96  19  4  36.24 
Divisive  
α = 1  85  94  9  12  20,768.36 
α = 2  88  95  9  5  
BCP  60  70  70  90  221.1 
5 Trend and change point interaction
5.1 Trend masked change point
 1.
detect the presence of change points
 2.
analyze the data set for trend
 3.
divide the data into segments based on change points
 4.
analyze those segment for the presence of trend
5.2 Change point masked trend
6 Conclusions
In this paper, we compared four different change point detection methods using an artificial data set. All of the methods fail to detect the change point location for the change in variance alone. From our experiments, we found that BCP is very sensitive and detects more change points other than the correct ones. However, EAgglomerative accurately identifies correct locations and numbers of change points, but is computationally expensive. Our experimental results imply that WBS is superior to other methods: It reliably identifies the correct number and locations of change points, and it takes less computational time for identification. We analyzed whether the change point methods are situation dependent, and we provided different experiments to challenge change point detection. We have tried to see whether change point masks the trend detection or vice versa. Our experiment shows that if both are present in the data set, analyzing only trend or change point may mislead the results. The situation potentially exists when changes in one phenomenon may affect the other.
References
 Adams RP, MacKay DJ (2007) Bayesian online changepoint detection. University of Cambridge, UKGoogle Scholar
 Baranowski R, Fryzlewicz P (2014) wbs: wild binary segmentation for multiple changepoint detection. R package version 1.1Google Scholar
 Erdman C, Emerson JW (2007) bcp: an R package for performing a Bayesian analysis of change point problems. J Stat Softw 23(3):1–13CrossRefGoogle Scholar
 Fryzlewicz P (2013) Wild binary segmentation for multiple changepoint detection. Department of Statistics, London School of Economics, LondonMATHGoogle Scholar
 GerardMerchant PG, Stooksbury DE, Seymour L (2008) Methods for starting the detection of undocumented multiple changepoints. J Clim 21:4887–4899CrossRefGoogle Scholar
 Hamed KH (2008) Trend detection in hydrologic data: the Mann Kendall trend test under the scaling hypothesis. J Hydrol 349:350–363CrossRefGoogle Scholar
 Hessa A, Iyera H, Malm W (2001) Linear trend analysis: a comparison of methods. Atmos Environ 35:5211–5222CrossRefGoogle Scholar
 James NA, Matteson DS (2013) ecp: an R package for nonparametric multiple change point analysis of multivariate data. ArXiv eprintsGoogle Scholar
 Liu S, Yamada M, Collier N, Sugiyama M (2013) Changepoint detection in timeseries data by relative densityratio estimation. Neural Netw 43:72–83CrossRefMATHGoogle Scholar
 Matteson DS, James NA (2013) A nonparametric approach for multiple change point analysis of multivariate data. J Am Stat Assoc 109(505):334–345. doi: 10.1080/01621459.2013.849605 MathSciNetCrossRefGoogle Scholar
 Partal T, Kahya E (2006) Trend analysis in Turkish precipitation data. Hydrol Process 20:2011–2026CrossRefGoogle Scholar
 Reeves J, Chen J, Wang XL, Lund R, Lu Q (2007) A review and comparison of changepoint detection techniques for climate data. J Appl Meteorol Climatol 46(6):900–915CrossRefGoogle Scholar
 Xiong L, Guo S (2004) Trend test and changepoint detection for the annual discharge series of the yangtze river at the Yichang hydrological station. Hydrol Sci J 49(1):99–112CrossRefGoogle Scholar
 Yue S, Pilon P, Cavadias G (2002) Power of the Mann–Kendall and Spearman’s rho tests for detecting monotonic trends in hydrological series. J Hydrol 259:254–271CrossRefGoogle Scholar