| cpt_methods | R Documentation |
Returns a tibble describing every method the package knows about (those
that are wired, those a user has registered with
cpt_register_method(), and those that are planned), along
with their capabilities and installation status. Useful for discovering
what can be run, what needs to be installed, and which methods expose the
extras the diagnostics need (confidence intervals, a fitted signal, a
posterior, a detector statistic, a solution path, a bandwidth to sweep).
cpt_methods(capabilities = TRUE)
capabilities |
Include the capability flag columns? Defaults to
|
A tibble with columns:
Method name as passed to cpt_detect().
What types of change the method can detect.
The upstream R package that implements the method.
"available" (wired in this release),
"registered" (supplied by the user this session; see
cpt_register_method()), or "planned"
(future).
TRUE if the engine package is installed,
FALSE if it is a Suggests engine that is missing,
NA for planned and registered methods.
What a planned method is waiting on: a release,
or "when on CRAN" when the engine package itself is not
available from CRAN. NA for methods that are already
wired. Asking cpt_detect() for a planned method reports
this rather than claiming the name does not exist.
Capability flags (omitted when
capabilities = FALSE). ci means the engine
supplies changepoint-location confidence intervals; fitted
a length-n fitted signal; posterior a per-location
posterior probability; statistic and path the
internals rendered by ggcpt_statistic() and
ggcpt_solution_path(), which error with the list
of supporting engines when a result does not carry them.
scale_space is not one of those, despite sitting beside
them. Nothing stores a scale space on a result:
cpt_scale_space() computes one on demand by
sweeping a multiscale detector's bandwidth over the series, so
it works on any series and any result, a pelt
fit included. What this column marks is the two engines that
sweep can be run with, i.e. the domain of that
function's own method argument:
subset(cpt_methods(), scale_space)$method.
online means the algorithm is sequential (it
consumes observations one at a time), and this table reports it
because it governs how the method behaves in batch: an online
detector's threshold is a rate per observation, so run over a
whole series through cpt_detect() it reports
roughly n / \mathrm{arl0} changepoints by construction.
It does not mean the method can be passed to
cpt_monitor(), which takes its own five:
"edetector", "cpm", "ocd",
"cusum" and "ewma". The two sets overlap without
coinciding: bocpd is an online algorithm this table marks
but the monitor does not offer, and edetector,
cusum and ewma are native to this package rather
than wrapped engines, so they have no row here at all.
The modelling vocabulary (omitted when
capabilities = FALSE): the distribution families
cpt_detect(family = ) accepts (see
cpt_families(); NA for a distribution-free
method); the engine's modelling-choice arguments and their legal
values, which cpt_detect() validates; whether it takes a
formula with covariates; the engine argument
min_segment is translated into; what the engine does with
a missing value, measured rather than read from its
documentation ("native", "compacts",
"silent_loss" or "reject"; see
cpt_detect(na_action = )); and the engine's own
changepoint convention, which the wrapper translates to
"left" ("right": it reports the first observation
after the change; "continuous": a location it estimates
on a continuous scale; "design": rows of a lagged design).
Measured and recorded properties (omitted
when capabilities = FALSE): whether the answer is the same
at x, 10 * x and 0.1 * x; whether it
depends on the direction of time; how many changepoints the
method can return where that is fixed; "general" for the
general-purpose workhorses; the argument that selects the noise
model and the one that sets the false-alarm rate; the runtime
class at n = 10{,}000 ("fast" under a second,
"moderate" under ten, "slow"); and the longest
series it finished within the measurement's time cap (0
when it did not finish 1,000 observations). The
measurements behind them are the cpt_runtimes and
cpt_invariances data sets.
cpt_install_engines() to install a whole family of
the engines this table reports on; cpt_detect() to run
one; cpt_register_method() to add your own.
cpt_methods()
# which methods can draw a confidence interval?
subset(cpt_methods(), ci)$method
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.