Provides a demonstration of the AFF method detecting changepoints in a stream.
demo_ffstream(showPlot = FALSE, returnStream = FALSE, plotSmall = FALSE)
Print output to screen, and plot (optional).
Boolean flag; if TRUE
, then a plot is generated.
Default is FALSE
.
Boolean flag; if TRUE
, then return the stream
as part of the list returned by the demo.
Default is FALSE
.
Boolean flag; if TRUE
, creates a small plot, as
needed for the vignette. Default is FALSE
.
Dean Bodenham
This method generates a stream with three changepoints, and finds
the changepoints with AFF. Also creates a plot of the data and
the changepoints if the showPlot
flag is set to TRUE
.
The observations are shown in black, the true changepoints are
shown as red dotted vertical lines, and the detected (estimated)
changepoints are shown as blue dashed lines. The following is
returned in a list:
The location of the true changepoints.
The detected (estimated) changepoints.
The method used, in this case AFF.
The data frame with the parameters used in the AFF method, in this case,
The significance level,
The step size in the gradient descent, whose value is not particularly important,
The length of the burn-in period.
D. A. Bodenham and N. M. Adams (2016) Continuous monitoring for changepoints in data streams using adaptive estimation. Statistics and Computing doi:10.1007/s11222-016-9684-8
df <- demo_ffstream()
# \donttest{
demo_ffstream(showPlot=TRUE)
# }
Run the code above in your browser using DataLab