hybridalg: Segment data into change points using a mixed...

Description Usage Arguments Details Value

View source: R/hybridalg.R


For the larger datasets, assume the data is hierarchical, but calculate the exact segments when they're smaller than a threshold


hybridalg(data, likelihood, allow_parallel = TRUE,
  max_segments = ncol(data), threshold = 50)



matrix for which to find the change points


a function receives the segment matrix as argument and returns a likelihood estimation. This function is used to calculate the change points that maximize the total likelihood. Depending on the algorithm being used, this function is likely to be executed many times, in which case it's also likely to be the bottleneck of the function execution, so it's advised that this function should have fast implementation.


allows parallel execution to take place using the registered cluster. Assumes a cluster is registered with the foreach package. Defaults to TRUE.


an integer that defines the maximum amount of segments to split the data into.


the threshold for which the exact algorithm will be used, i.e. when the number of columns in the segment is less than or equal to the threshold.


This algorithm implements an approach mixing the hierarchical and exact algorithms. It uses the hierarchical algorithms when the size of the segment is bigger than the threshold, and then goes on to use the exact algorithm when the size of the segment is less than or equal to the threshold.


a list of type segmentr, which has the two attributes:

segmentr documentation built on Aug. 29, 2019, 1:03 a.m.