wbs_wrapper: WBS wrapper: Wild Binary Segmentation

View source: R/wrap-search.R

wbs_wrapperR Documentation

WBS wrapper: Wild Binary Segmentation

Description

Wraps the wbs package for randomised changepoint detection via Wild Binary Segmentation.

Usage

wbs_wrapper(x, n_intervals = 5000, threshold = NULL, seed = NULL, ...)

Arguments

x

A numeric vector.

n_intervals

Number of random intervals. Defaults to 5000.

threshold

Manual threshold for detection. If NULL, model selection uses the strengthened Schwarz Information Criterion (sSIC).

seed

Optional seed for reproducibility. The seed is scoped to this call: .Random.seed is saved and restored, so a seeded call inside a simulation loop does not pin the loop's own stream.

...

Additional arguments passed to wbs::wbs().

Value

A ggcpt object.

References

\insertRef

fryzlewicz2014wildggchangepoint

See Also

Other changepoint engines: bcp_wrapper(), beast_wrapper(), bfast_wrapper(), binsegrcpp_wrapper(), bocpd_wrapper(), capa_wrapper(), cpm_wrapper(), cpop_wrapper(), cpt_wrapper(), decafs_wrapper(), ecp_wrapper(), envcpt_wrapper(), esac_wrapper(), fabisearch_wrapper(), fastcpd_wrapper(), fcov_wrapper(), fmean_wrapper(), fpop_wrapper(), geomcp_wrapper(), hdcov_wrapper(), hdreg_wrapper(), idetect_wrapper(), inspect_wrapper(), kcp_wrapper(), kwc_wrapper(), mcp_wrapper(), mosum_wrapper(), network_wrapper(), not_wrapper(), npmojo_wrapper(), nsp_wrapper(), ocd_wrapper(), pilliat_wrapper(), segmented_wrapper(), smuce_wrapper(), sn_wrapper(), strucchange_wrapper(), taylor_wrapper(), tguh_wrapper(), trend_wrapper(), var_wrapper(), wbs2_wrapper(), wbsts_wrapper()

Examples


set.seed(2026)
res <- wbs_wrapper(c(rnorm(60), rnorm(60, 4)), n_intervals = 200)
res$changepoints
res$penalty$type   # sSIC selection, because `threshold` was not supplied


ggchangepoint documentation built on Nov. 5, 2026, 9:06 a.m.