hieralg: Segment data into change points assuming hierarchical...

Description Usage Arguments Details Value

View source: R/hieralg.R

Description

By assuming change points follow an hierarchical architecture, this architecture manages to run faster by not searching all possible branches

Usage

1
2
hieralg(data, likelihood, max_segments = ncol(data),
  allow_parallel = TRUE)

Arguments

data

matrix for which to find the change points

likelihood

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.

max_segments

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

allow_parallel

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

Details

Fast algorithm that segments data into change points, and it does so by simplifying by reducing the search possibilities by assuming data split in an hierarchical structure, i.e. a segment found in a first trial is assumed to contain only segments independent of the rest of the data. This algorithm usually runs very fast, but is known to yield less accurate results, possibly not finding the exact change points that would maximize likelihood.

Value

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


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