These functions provide a clustering of a signal on graph into a piecewise constant
signal on graph. Given a graph and a signal gamma
assigning a value to each node,
it returns another signal which is constant over subgraphs where gamma
has
close to equal value. See references.
Only parameters gamma
and graph
need be provided. The other parameters concern
the internals of the estimating procedure and usually do not need to be changed.
agraph
is the general-purpose function. agraph_prec
does the same thing as
agraph
in the case where gamma
as a covariance structure. It is provided as
the precision matrix prec
, which has to be a sparse matrix (Matrix::sparseMatrix
)
for fast computation. See Goepp and van de Kassteele (2021).
agraph(
gamma,
graph,
lambda = 10^seq(-4, 4, length.out = 50),
weights = NULL,
shrinkage = TRUE,
delta = 1e-10,
tol = 1e-08,
thresh = 0.01,
itermax = 50000
)agraph_prec(
gamma,
graph,
prec,
lambda = 10^seq(-4, 4, length.out = 50),
weights = NULL,
shrinkage = TRUE,
delta = 1e-10,
tol = 1e-08,
thresh = 0.01,
itermax = 10000
)
A list with the following elements:
result
: matrix whose rows are the segmented output of input signal gamma
, for each value of lambda
bic
, gcv
, and aic
: vectors of length length(lambda)
, giving the BIC, GCV, and AIC criteria for each value of lambda. See references below.
model_dim
, nll
: vectors of length length(lambda)
, giving the model dimension and negative log-likelihood for each value of lambda. See reference below for the definition of these terms.
input vector to regularize
an igraph object (from package igraph
) giving the regularization structure
regularizing constant
weights for gamma. Default value is one.
Boolean, defaults TRUE. Whether to return the adaptive ridge estimate as output. If FALSE, the adaptive ridge is used to define a segmentation into zones, and the signal is estimated on each zone using non-penalized estimation.
Computational constant in the adaptive ridge reweighting formula.
Tolerance to test for convergence of the adaptive ridge
Thresholding constant used to fuse two adjacent regions with close value of gamma
.
Total number of iterations. Default value is 10000. Setting a low value can make the procedure return NULL entries for some values of lambda
.
precision matrix (inverse of the variance-covariance matrix). Has to be a sparse matrix for efficiency.
Schwarz G. (1978) Estimating the Dimension of a Model. Ann. Statist. 6 (2) 461 - 464, March, 1978. tools:::Rd_expr_doi("10.1214/aos/1176344136")
Akaike H. (1974) A new look at the statistical model identification, in IEEE Transactions on Automatic Control, vol. 19, no. 6, pp. 716-723, December 1974 tools:::Rd_expr_doi("10.1109/TAC.1974.1100705")
Hastie T., Friedman J., and Tibshirani R. (2009) The elements of statistical learning: data mining, inference, and prediction (Vol. 2, pp. 1-758). New York: Springer tools:::Rd_expr_doi("10.1007/978-0-387-21606-5")
Goepp V. and van de Kassteele J. (2021) Graph-Based Spatial Segmentation of Health-Related Areal Data, arxiv preprint. tools:::Rd_expr_doi("10.48550/arXiv.2206.06752")
flsa_graph()