Description Usage Arguments Value
This function calculates the changepoints with highest probability in the online algorithm to take in the current probabilities at time t in the form of a list of lists. It will not calculate the result at every possible end point, because this will be done in the main loop of online cpd as it iterates: the probmaxes and cps list will be returned and passed into the function again each time.
1 2 | findCPprobs(currrunprobs, probmaxes, logprobcpstrunc, Rlength, t,
minsep = 3, maxsep = 90, ppres = FALSE)
|
currrunprobs |
The current most recently calculated "R" vector, of run length probabilities (sums to 1). |
probmaxes |
The probabilities of the set of changepoints with the highest probability for each preceding time point. |
logprobcpstrunc |
The set of changepoints with the highest probability for each previous time point. |
Rlength |
The length of the current R vector, to use in case it was truncated. |
t |
The current time point. |
minsep |
The minimum distance of separation allowed for eligible changepoint locations to be included in the list of changepoints with the highest probability. |
maxsep |
The maximum distance of separation allowed for eligible changepoint locations to be included in the list of changepoints with the highest probability. |
ppres |
Set to true if wanting to return optional outputs, useful for plotting and inspecting the algorithm, but not necessary. |
Two lists needed for the use in calculating this changepoints for the next incoming time point: the vector of max probabilities for each time point (probmaxes), and the list of changepoints with the highest probability at each time point (changepoints: a list of lists). It also returns ppresult: optional outputs, will be null if ppres=FALSE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.