toy_regularization | R Documentation |
The estimator in this package computes the optimum of -l(C, p) + λ*R(leftIndex, rightIndex, nrow, ncol), where l is the log likelihood of the family, lambda is the penalization constant and R is the regularization function. The user can create his own regularization function and pass as an argument to fit_blockcpd. It should have four arguments, in the following order: left_index, right_index, nrow and ncol. Each argument is explained in the parameter section. If the function depends on leftIndex and rightIndex, it will be non-homogeneous, which might be interesting in some applications. The package implements some functions as an example, but uses only bic_loss as the default. The algorithm is consistent as long as the the regularization is bounded by a constant.
toy_regularization(left_index, right_index, nrow, ncol)
left_index |
First index of the interval |
right_index |
Last index of the interval |
nrow |
Number of rows/signals/series |
ncol |
Number of columns/variables |
my_reg <- function(leftIndex, rightIndex, nrow, ncol){ block_size = (rightIndex - leftIndex + 1) return(log(nrow*ncol)*(1/block_size)) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.