Uses binary splitting to obtain a greedy solution to the regularized loss optimization problem. Should be called within fit_blockcpd
compute_hierseg(
suff_stats,
family,
lambda = 1,
nrow,
ncol,
pen_func = bic_loss,
min_block_size = min_block_size,
max_blocks = NULL
)
Sufficient statistics to perform change point analysis
The name of the family used to fit the model
Penalization constant
Number of rows or samples
Number of columns or variables
A penalization function defined i integer intervals The function signature should be pen(left_index, right_index, nrow, ncol), where the left_index:right_index is the integer interval, nrow the sample size and ncol the number of variables/columns.
Minimum block size allowed. Default is 0, and the value must be smaller or equal to ncol.
Threshold on the number of block segments to fit the model. Set low values for this parameters if having performance issues on large data sets.