| Title: | Asymptotic Distribution-Free Change-Point Detection via a New Ranking Scheme (RING) |
|---|---|
| Description: | Rank-based, asymptotic distribution-free change-point detection for modern (high-dimensional, non-Euclidean) data, based on the graph-induced ranking scheme of Zhou and Chen (2025) <doi:10.1109/TIT.2025.3575858>. Given a rank matrix built from a pairwise similarity, the method scans for a single change-point or a changed interval using three statistics (weighted 'WR', max-type 'MR', and generalized 'TR') and returns analytic distribution-free p-value approximations (with an optional skewness correction) as well as optional permutation p-values. |
| Authors: | Doudou Zhou [aut], Hao Chen [aut, cre] |
| Maintainer: | Hao Chen <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 0.1.0 |
| Built: | 2026-06-25 17:25:22 UTC |
| Source: | https://github.com/cran/ringSeg |
Implements the RING change-point detector (Zhou & Chen, 2025, IEEE TIT): a rank-based, asymptotic distribution-free scan for a single change-point or a changed interval in a sequence of (possibly high-dimensional / non-Euclidean) observations. The method operates on a rank matrix built from a pairwise similarity and returns the weighted (WR), max-type (MR), and generalized (TR) statistics with analytic distribution-free p-value approximations (optionally skewness-corrected) and optional permutation p-values.
Main entry points: ring_cpd (data / distance / rank-matrix in),
rcpd (rank matrix in), ring_graph (build the RING
k-NN rank graph), Rise_Rank (low-level ranker).
Doudou Zhou, Hao Chen (maintainer)
Zhou, D. and Chen, H. (2025). Asymptotic Distribution-Free Change-Point Detection for Modern Data Based on a New Ranking Scheme. IEEE Transactions on Information Theory, 71(8), 6183–6197. doi:10.1109/TIT.2025.3575858.
Core RING detector operating directly on a rank matrix. The analytic
p-value approximations are distribution-free and require no permutation;
they assume the sparse RING k-NN graph, so build R with
ring_graph, or call ring_cpd to build it for you.
rcpd(R, n0 = NULL, n1 = NULL, pval.appr = TRUE, skew.corr = TRUE, B = 0, alternative = c("single", "interval"))rcpd(R, n0 = NULL, n1 = NULL, pval.appr = TRUE, skew.corr = TRUE, B = 0, alternative = c("single", "interval"))
R |
an |
n0, n1
|
scan range; defaults |
pval.appr |
logical; compute analytic distribution-free p-value approximations for the WR, MR and TR statistics. |
skew.corr |
logical; additionally compute the skewness-corrected
approximation ( |
B |
number of permutations for permutation p-values ( |
alternative |
|
A list containing
scanZ |
the scan statistics. For |
pval.appr |
(if |
pval.perm |
(if |
Zhou, D. and Chen, H. (2025). Asymptotic Distribution-Free Change-Point Detection for Modern Data Based on a New Ranking Scheme. IEEE Transactions on Information Theory, 71(8), 6183–6197. doi:10.1109/TIT.2025.3575858.
set.seed(1) n <- 150; d <- 8 X <- matrix(rnorm(n * d), n, d) X[76:n, ] <- X[76:n, ] + 0.8 R <- ring_graph(as.matrix(dist(X)), k = 13) res <- rcpd(R, B = 0) res$scanZ$TR$tau res$pval.appr$TRset.seed(1) n <- 150; d <- 8 X <- matrix(rnorm(n * d), n, d) X[76:n, ] <- X[76:n, ] + 0.8 R <- ring_graph(as.matrix(dist(X)), k = 13) res <- rcpd(R, B = 0) res$scanZ$TR$tau res$pval.appr$TR
Convenience wrapper: builds the RING rank graph from the input (unless a rank
matrix is supplied) and calls rcpd. Observations must be in time order.
ring_cpd(x, is.distance = FALSE, is.rank = FALSE, k = NULL, dist.method = "euclidean", n0 = NULL, n1 = NULL, pval.appr = TRUE, skew.corr = TRUE, B = 0, alternative = c("single", "interval"))ring_cpd(x, is.distance = FALSE, is.rank = FALSE, k = NULL, dist.method = "euclidean", n0 = NULL, n1 = NULL, pval.appr = TRUE, skew.corr = TRUE, B = 0, alternative = c("single", "interval"))
x |
One of: an |
is.distance |
logical; if |
is.rank |
logical; if |
k |
number of nearest neighbours for the RING k-NN graph
(default |
dist.method |
distance passed to |
n0, n1
|
scan range (defaults |
pval.appr |
logical; compute analytic p-value approximations. |
skew.corr |
logical; also compute the skewness-corrected approximation. |
B |
number of permutations for permutation p-values ( |
alternative |
|
A list with scanZ (the WR / MR / TR statistics and estimated
change-point(s)) and, as requested, pval.appr and pval.perm.
See rcpd.
Zhou, D. and Chen, H. (2025). Asymptotic Distribution-Free Change-Point Detection for Modern Data Based on a New Ranking Scheme. IEEE Transactions on Information Theory, 71(8), 6183–6197. doi:10.1109/TIT.2025.3575858.
set.seed(1) n <- 200; d <- 10; tau <- 100 X <- matrix(rnorm(n * d), n, d) X[(tau + 1):n, ] <- X[(tau + 1):n, ] * 1.6 # a dispersion change at t = 100 res <- ring_cpd(X, skew.corr = TRUE) res$scanZ$TR$tau res$pval.appr$TRset.seed(1) n <- 200; d <- 10; tau <- 100 X <- matrix(rnorm(n * d), n, d) X[(tau + 1):n, ] <- X[(tau + 1):n, ] * 1.6 # a dispersion change at t = 100 res <- ring_cpd(X, skew.corr = TRUE) res$scanZ$TR$tau res$pval.appr$TR
Constructs the sparse, rank-based k-nearest-neighbour graph that the RING
statistics operate on – RING's ranking scheme: rank each observation's
neighbours within its row of the similarity , keep the k
nearest (weights k..1 from nearest to k-th), and symmetrize.
ring_graph(D, k = NULL)ring_graph(D, k = NULL)
D |
an |
k |
number of nearest neighbours (default |
An rank matrix with zero diagonal, suitable as the R
argument of rcpd.
set.seed(1) X <- matrix(rnorm(60 * 5), 60, 5) R <- ring_graph(as.matrix(dist(X)), k = 8) dim(R)set.seed(1) X <- matrix(rnorm(60 * 5), 60, 5) R <- ring_graph(as.matrix(dist(X)), k = 8) dim(R)
Low-level ranker for the RING statistics: turns a similarity matrix into a
rank matrix. method = "row" is the per-row ranking used to build the
sparse RING k-NN graph. For change-point detection, build the R argument
of rcpd with ring_graph (the validated sparse graph);
the analytic p-value theory assumes that graph rather than a dense
"overall" ranking.
Rise_Rank(S, method = c("overall", "row"))Rise_Rank(S, method = c("overall", "row"))
S |
an |
method |
|
An rank matrix with zero diagonal.
set.seed(1) X <- matrix(rnorm(50 * 5), 50, 5) R <- Rise_Rank(-as.matrix(dist(X)), method = "overall") dim(R)set.seed(1) X <- matrix(rnorm(50 * 5), 50, 5) R <- Rise_Rank(-as.matrix(dist(X)), method = "overall") dim(R)