Computes the exact solution of the regularized loss optimization problem, providing change point locations and the parameters of each blocks. Should be called within fit_blockcpd
compute_dynseg(
suff_stats,
family,
lambda = 1,
nrow,
ncol,
min_block_size = min_block_size,
max_blocks = ncol - 1,
pen_func = bic_loss
)
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
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.
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.