Description Usage Arguments Details Value See Also Examples
Generic function to segment data into separate change points according to specified algorithm
1 2 |
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 |
algorithm |
can be of type |
... |
other parameters to be passed to the underlying function |
This function can be used as a generic function to call any of the algorithms implemented by the package. Depending on the type of data the user wants to segment, one algorithm might be more adequate than the others.
a list of type segmentr
, which has the two attributes:
changepoints
: a vector with the first index of each identified change point
segments
: a list of vectors, in which each vector corresponds to the indices
that identifies a segment.
exactalg()
for the exact algorithm, hieralg()
for the
hierarchical algorithm implementation, hybridalg()
for the hybrid
algorithm implementation.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.