find_best_split: Find best split of a sequence

Description Usage Arguments Value

View source: R/JSD.R

Description

Find the best possible split of a sequence according to the Jensen-Shannon divergence. It computes this measure for all possible split points and select the best split as the one maximizing it

Computes the JS divergence of the two adjacent subsequences delimited by 'split_point'. Actually, the entroy of the overall sequence should be added as well, but is neglected since it is the same for all the possible split points.

Usage

1
find_best_split(chain, cutoff = 15)

Arguments

chain

= the sequence of which to find the split point

cutoff

= smaller possible size of a chunk

chain

= the sequence of which to estimate the JS divergence

split_point

= the position in which the sequence is split

w

= 2-elements vector containing the weights to apply to the two different subsequences in the computation. If 'NULL', the weights are taked to be proportional to the length of the subsequence

Value

a list containing i) index of the change point ii) value for the Jensen-Shannon divergence at that point (used in the BIC criterion).

The computed value of JS divergence


aaaaana/changepoints documentation built on May 26, 2019, 1:35 p.m.