Learn R Programming

ffstream (version 0.1.7.2)

Forgetting Factor Methods for Change Detection in Streaming Data

Description

An implementation of the adaptive forgetting factor scheme described in Bodenham and Adams (2016) which adaptively estimates the mean and variance of a stream in order to detect multiple changepoints in streaming data. The implementation is in 'C++' and uses 'Rcpp'. Additionally, implementations of the fixed forgetting factor scheme from the same paper, as well as the classic cumulative sum ('CUSUM') and exponentially weighted moving average ('EWMA') methods, are included.

Copy Link

Version

Install

install.packages('ffstream')

Monthly Downloads

41

Version

0.1.7.2

License

GPL-2 | GPL-3

Maintainer

Dean Bodenham

Last Published

May 30th, 2023

Functions in ffstream (0.1.7.2)

checkStream

Check the stream consists of finite numeric values
checkAFFargs

Check the arguments for AFF (no change detection)
checkFFFargs

Check the arguments for FFF (no change detection)
computeTwoSidedPvalueR

Compute a two-sided p-value from a quantile value
checkBooleans

Check the multiple and single flags, as well as usePrechange and skipCheck
cpp_detectCUSUMMeanMultiple

Search for multiple changepoints in the mean using CUSUM
cpp_detectAFFMeanSinglePrechange

Find the first changepoint in the mean using AFF, assuming prechange known
cpp_computeAFFMean

Compute the AFF mean of a vector
cpp_computeFFFMean

Compute the FFF mean of a vector
cpp_detectAFFMeanMultiple

Search for multiple changepoints in the mean using AFF
cpp_detectAFFMeanSingle

Find the first changepoint in the mean using AFF
convertPvalueToCorrectSideR

Convert a 'p-value' to the correct side.
computeFFFMean

Quick computation of FFF mean of a given vector
computeAFFMean

Quick computation of AFF mean of a given vector
combineTwoOneSidedPvaluesR

Combine two p-values into a single p-value
computeOneSidedPvalueR

Compute a one-sided p-value from a quantile value
cpp_detectFFFMeanSingle

Find the first changepoint in the mean using FFF
demo_ffstream

Demo for ffstream
cpp_detectFFFMeanMultiple

Search for multiple changepoints in the mean using FFF
cpp_detectFFFMeanSinglePrechange

Find the first changepoint in the mean using FFF, assuming prechange known
cpp_detectEWMAMeanMultiple

Search for multiple changepoints in the mean using EWMA
detectAFFMean

Detect a change/changes in a vector using AFF method
cpp_detectEWMAMeanSingle

Find the first changepoint in the mean using EWMA
cpp_detectCUSUMMeanSinglePrechange

Find the first changepoint in the mean using CUSUM, assuming prechange known
cpp_detectEWMAMeanSinglePrechange

Find the first changepoint in the mean using EWMA, assuming prechange known
cpp_detectCUSUMMeanSingle

Find the first changepoint in the mean using CUSUM
detectFFFMean

Detect a change/changes in a vector using FFF method
ffstream_vignette

ffstream vignette 0.1.7
detectCUSUMMean

Detect a change/changes in a vector using 'CUSUM' method
getInBoundsErrorMessage

Create the error message for a certain parameter outside its bounds
getFiniteErrorMessage

Create the error message for a certain parameter that is not finite
ensureFolderDoesNotEndInSep

Checks that the last character of the folder is the separator
getExistsErrorMessage

Create the error message for a certain parameter that does not exist
detectEWMAMean

Detect a change/changes in a vector using 'EWMA' method
ffstream

ffstream package 0.1.7
doesNotExist

Check if an object exists
get_xbar_deriv

Compute the derivative of xbar
get_nextobs_fromstream

Obtain the next observation
get_xbar

Compute xbar
getv_from_u_and_w

Calculate v
initAFFMean

Initialisation of AFF mean
inbounds

Check if a value is inside bounds
getMissingErrorMessage

Create the error message for a certain parameter that is missing
getIsAboveErrorMessage

Create the error message for a certain parameter not above a threshold
isInBoundsStrictly

Check if an argument is in the open set (lower, upper)
update_lambda

Update lambda
initAFFMeanCD

Initialisation of AFF change detector
isInteger

Check if a value is an integer
initFFFMeanCD

Initialisation of FFF mean change detector
initFFFMean

Initialisation of FFF
isAboveBound

Check if an argument above a certain value
update_m

Calculate m
update_w

Update the weight
makeStreamMeanChangeR

Create a stream with a certain number of changes
isInBounds

Check if an argument is in the closed set [lower, upper]
getNormalLimitsFromList

Compute confidence limits assuming the normal distribution
initCUSUMMeanCD

Initialisation of 'CUSUM'
initEWMAMeanCD

Initialisation of EWMA
update_var

Update the FF variance
modifyValueStr

Modify the string containing the value
modifyFunctionPrefix

Modify the function name prefix
get_L_deriv

Compute the derivative of L
update_streampos

Update the stream position
update_Delta

Update Delta
isInLimitsNormal

Check if in the limits
update_u

Update u
update_mean

Update the FF mean
update_Omega

Update Omega
update_ffmean

Update the FF mean (duplicate)
CUSUM_stream_jumpdetect_prechange

'CUSUM' change detection for a stream in R with known prechange parameters
EWMA_stream_jumpdetect

'EWMA' change detection for a stream in R with
EWMA_stream_jumpdetect_prechange

'EWMA' change detection for a stream in R with known prechange parameters
CUSUM_stream_jumpdetect

'CUSUM' change detection for a stream in R
AFF_scaled_stream_jumpdetect

Change detection using the AFF method
FFF_stream_jumpdetect

Change detection using the Fixed Forgetting Factor method
AFF_scaled_stream_no_change_detection

Compute the adaptive forgetting factor - no change detection
AFF_scaled_stream_jumpdetect_prechange

Change detection using the AFF method, using prechange mean and vairance
checkFFFMeanCDargs

Check the arguments for FFF change detection initialisation
checkPrechange

Check the prechange mean, sigma and variance are appropriately defined
checkEWMAMeanCDargs

Check the arguments for 'EWMA' mean change detector
FFF_stream_jumpdetect_prechange

Change detection using the Fixed Forgetting Factor method, prechange known
checkCUSUMMeanCDargs

Check the arguments for 'CUSUM' mean change detector
checkAFFMeanCDargs

Check the arguments for AFF mean change detector