Skip to contents

Smooths a response defined on the vertices of a graph by keeping the low-frequency part of its expansion in the eigenvectors of the graph Laplacian. The amount of smoothing is selected by generalized cross-validation. Edge values can be conductances, or lengths that are converted to conductances. With the heat filter and a complete set of eigenvectors, responses with missing values can also be fitted, by penalized least squares on the observed vertices.

Usage

fit.metric.graph.lowpass(
  adj.list,
  weight.list,
  y,
  conductance.rule = c("inverse.length.power", "exp.length", "exp.length.squared",
    "self.tuned.gaussian"),
  conductance.epsilon = 1e-08,
  conductance.alpha = 1,
  conductance.sigma = NULL,
  conductance.sigma.rule = c("edge.quantile", "median", "local.k"),
  conductance.sigma.quantile = 0.75,
  conductance.local.k = 5L,
  laplacian.type = c("unnormalized", "symmetric.normalized"),
  n.eigenpairs = 50L,
  filter.type = c("heat_kernel", "tikhonov", "cubic_spline", "gaussian", "exponential",
    "butterworth"),
  eta.grid = NULL,
  n.candidates = 40L,
  eigen.solver = c("auto", "sparse", "dense"),
  dense.eigen.threshold = 200L,
  dense.fallback.threshold = 5000L,
  dense.fallback = c("auto", "never", "always"),
  verbose = FALSE,
  eta.search = c("fixed", "guarded.gcv"),
  eta.expansion.factor = 3,
  eta.max.expansions = 3L,
  eta.identity.departure = 0.01,
  eta.truncation.tol = 1e-04,
  weight.type = c("length", "conductance"),
  spectrum = c("partial", "full"),
  numerical.policy = c("conservative", "verified.fallback")
)

Arguments

adj.list

List of integer neighbor vectors using 1-based vertex indices.

weight.list

List of weights parallel to adj.list: positive metric lengths or nonnegative conductances, according to weight.type.

y

Numeric response vector of length length(adj.list). NA marks unobserved vertices and requires a complete basis and heat filtering. Every component must have an observed response.

conductance.rule

Character scalar. One of "inverse.length.power", "exp.length", "exp.length.squared", or "self.tuned.gaussian".

conductance.epsilon

Positive numeric regularizer used by inverse-power conductances and as a local-scale floor.

conductance.alpha

Positive numeric exponent for "inverse.length.power".

conductance.sigma

Optional positive global scale for exponential rules. If NULL, it is selected by conductance.sigma.rule.

conductance.sigma.rule

Rule for selecting a global scale when needed.

conductance.sigma.quantile

Quantile used when conductance.sigma.rule = "edge.quantile".

conductance.local.k

Positive integer local incident-edge order statistic for "self.tuned.gaussian".

laplacian.type

Laplacian operator. "unnormalized" uses the weighted graph Laplacian \(L = D - C\). "symmetric.normalized" uses \(L_{\mathrm{sym}} = I - D^{-1/2} C D^{-1/2}\).

n.eigenpairs

Positive integer number of eigenpairs to compute.

filter.type

Spectral low-pass filter family.

eta.grid

Optional numeric eta grid. Values must be positive except for filter.type = "heat_kernel", where eta = 0 is allowed as an identity/no-smoothing diagnostic with undefined GCV, excluded from selection. A grid containing only zero therefore cannot produce a fit; use apply.metric.graph.lowpass.path to evaluate that endpoint. If NULL, the existing package helper generate.eta.grid() is used.

n.candidates

Number of eta candidates when eta.grid = NULL.

eigen.solver

"auto", "sparse", or "dense". "auto" uses dense decomposition for n <= dense.eigen.threshold or a request exceeding the sparse backend's n - 2 capacity; otherwise it tries sparse first.

dense.eigen.threshold

Exact dense threshold for auto mode. Default 200L, intended for small reference/testing problems.

dense.fallback.threshold

Maximum graph size for emergency dense fallback when sparse decomposition fails and fallback is allowed.

dense.fallback

"auto", "never", or "always".

verbose

Logical. Reserved for future diagnostic messages.

Heat-time search controller. "fixed" evaluates the supplied or generated grid once. "guarded.gcv" is available only for filter.type = "heat_kernel" and proposes one lower positive time whenever GCV selects the current lower endpoint.

eta.expansion.factor

Geometric divisor used by guarded GCV lower-time expansion.

eta.max.expansions

Maximum number of guarded GCV lower-time extensions.

eta.identity.departure

Smallest allowed departure from the identity at the largest retained graph-Laplacian eigenvalue.

eta.truncation.tol

Omitted-mode attenuation tolerance used to certify guarded proposals for a truncated basis.

weight.type

Weight interpretation. "length" transforms lengths; "conductance" uses positive weights unchanged and removes zero edges. Reciprocal conductances must agree; self-loops must be removed by the caller. Conductance-transform settings are unused for direct conductances.

spectrum

"partial" retains the requested number of modes. "full" requests and verifies all vertex eigenpairs with a dense solver, overriding n.eigenpairs; sparse-only requests are rejected.

numerical.policy

See metric.graph.lowpass.basis. The default is conservative; the bounded fallback must be requested explicitly.

Value

A list of class "metric.graph.lowpass.fit". The GCV record includes per-candidate status, observed count and degrees of freedom. Missing-response residuals remain NA. The fitting.mode field distinguishes the observed heat-penalty fit from a fully observed spectral filter. For missing responses, the stored spectral filter weights describe the base heat kernel, not eigenvalues of the observed fitting matrix.

Details

Missing-response heat fits minimize observed squared error plus \(f^T (\exp(tL)-I) f\). This reduces to ordinary heat filtering when all vertices are observed. GCV is \(q\,RSS/(q-\mathrm{tr}(S_O))^2\), with \(q\) observed responses and observed-data operator \(S_O\). Zero heat time is an identity diagnostic with undefined GCV and cannot be selected. A grid with no valid GCV candidate fails explicitly.

References

Gajer, P. and Ravel, J. (2025). Adaptive geometric regression for high-dimensional structured data. arXiv:2511.03817. doi:10.48550/arXiv.2511.03817

Examples

adj <- list(2L, c(1L, 3L), c(2L, 4L), 3L)
lengths <- list(1, c(1, 1), c(1, 1), 1)
fit.metric.graph.lowpass(
  adj, lengths, y = c(0, 0.2, 1.8, 2), n.eigenpairs = 4L,
  eta.grid = c(0.1, 1), eigen.solver = "dense"
)
#> 
#> Metric-Conductance Graph Low-Pass Fit
#> ====================================
#> 
#> Vertices: 4; edges: 3
#> Conductance rule: inverse.length.power
#> Laplacian: unnormalized
#> Filter: heat_kernel; eta: 1.0000e-01; GCV: 4.4652e-01; effective df: 3.47