| Type: | Package |
| Title: | Asymptotic Distribution-Free Change-Point Detection via a New Ranking Scheme (RING) |
| Version: | 0.1.0 |
| 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. |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| Encoding: | UTF-8 |
| Imports: | stats |
| NeedsCompilation: | no |
| Packaged: | 2026-06-21 08:53:55 UTC; hao |
| Author: | Doudou Zhou [aut], Hao Chen [aut, cre] |
| Maintainer: | Hao Chen <hxchen@ucdavis.edu> |
| Repository: | CRAN |
| Date/Publication: | 2026-06-25 11:30:02 UTC |
ringSeg: rank-based asymptotic distribution-free change-point detection
Description
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.
Details
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).
Author(s)
Doudou Zhou, Hao Chen (maintainer)
References
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.
Build a rank matrix from a similarity matrix
Description
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.
Usage
Rise_Rank(S, method = c("overall", "row"))
Arguments
S |
an |
method |
|
Value
An n \times n rank matrix with zero diagonal.
See Also
Examples
set.seed(1)
X <- matrix(rnorm(50 * 5), 50, 5)
R <- Rise_Rank(-as.matrix(dist(X)), method = "overall")
dim(R)
RING rank-based change-point detection (rank matrix in)
Description
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.
Usage
rcpd(R, n0 = NULL, n1 = NULL, pval.appr = TRUE, skew.corr = TRUE,
B = 0, alternative = c("single", "interval"))
Arguments
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 |
|
Value
A list containing
scanZ |
the scan statistics. For |
pval.appr |
(if |
pval.perm |
(if |
References
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.
See Also
Examples
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$TR
RING change-point detection from data or a distance matrix
Description
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.
Usage
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"))
Arguments
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 |
|
Value
A list with scanZ (the WR / MR / TR statistics and estimated
change-point(s)) and, as requested, pval.appr and pval.perm.
See rcpd.
References
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.
See Also
Examples
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$TR
Build a RING rank graph from a distance matrix
Description
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 S = \max(D) - D, keep the k
nearest (weights k..1 from nearest to k-th), and symmetrize.
Usage
ring_graph(D, k = NULL)
Arguments
D |
an |
k |
number of nearest neighbours (default |
Value
An n \times n rank matrix with zero diagonal, suitable as the R
argument of rcpd.
See Also
Examples
set.seed(1)
X <- matrix(rnorm(60 * 5), 60, 5)
R <- ring_graph(as.matrix(dist(X)), k = 8)
dim(R)