Description Usage Arguments Value
Find Changepoints in a design matrix
1 2 3 4 |
x |
A design matrix |
method |
The method used to find splits. One of |
optimizer |
The optimizer used to find change points. Supply |
delta |
The minimal relative segment length. |
lambda |
A regularisation parameter for methods that require one. |
loss_function |
A function with formal arguments |
gain_function |
A function with formal arguments |
cross_validation_function |
A function with formal arguments |
model_selection_function |
A function with formal arguments |
control |
An object of class |
get_best_split |
A function with formal arguments |
lambda |
A tuning parameter used in the evaluation of the gain curve. If a |
A tree with the splitting structure of the binary segmentation algorithm. If some form of inner cross validation or model selection was used, the estimated change points can be extracted via get_change_points_from_tree.
A function that estimates change points in x
. Currently available methods are random_forest
, glasso
, elastic_net
and custom
.
For all but the latter loglikelihood based loss functions are used to estimate the best split in a binary segmentation fashion. For the method custom
an
individual loss, gain or best_split_function can be supplied to find change points. The best split in each step of BS is found using optimizer, which can be set
to be one of line_search
, section_search
or two_step_search
. Line Search finds the maximum of the gains function by evaluating it at every
possible split. Section Search (also Optimistic Binary Search) makes use of the piecewise convex structure of the gains curve to find one of the local maxima with
approximately log(n)
evaluations of the gain function. Two Step Search uses the individual loglikelihoods of predictions after a fit at a first guess to
obtain a second guess which gets refined to an final best split point. For methods other than random_forest
we encourage the use of Line Search whenever the
computational cost allows this and Section Search else. We recommend the Two Step Search for the random_forest
method.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.