Skip to contents

Assembles experimental parallel-transport trend-filtering (PTTF) transported-difference operators from a pttf.geometry object. This is an operator-construction function only: it does not fit a response, tune a penalty parameter, or run an \(\ell_1\)/\(\ell_2\) smoother.

Usage

pttf.operator(
  geometry,
  derivative.order = 3L,
  edge.status.policy = c("ok.only", "frame.fallback"),
  regression.weight.rule = c("inverse.length.squared", "inverse.length", "unit"),
  edge.length.epsilon = 1e-08,
  tensor.scaling = c("hs", "raw"),
  row.mass.rule = c("node.mass", "none"),
  row.normalize = c("none", "l2"),
  min.operator.rank.tol = 1e-10,
  max.operator.condition = 1e+08,
  return.intermediate = TRUE,
  return.A = TRUE,
  return.B = TRUE,
  diagnostics = TRUE
)

Arguments

geometry

A "pttf_geometry" object from pttf.geometry.

derivative.order

Integer derivative order, one of 1L, 2L, or 3L.

edge.status.policy

Edge transport policy. "ok.only" uses only transports with status "ok". "frame.fallback" also allows direct-frame fallback transports for non-OK shared-support statuses.

regression.weight.rule

Local regression edge-weight rule.

edge.length.epsilon

Positive numeric edge-length floor.

tensor.scaling

Symmetric tensor coordinate scaling. "hs" uses square-root multiplicity scaling so coordinate Euclidean norms match Hilbert–Schmidt norms. "raw" stores unscaled unique symmetric components.

row.mass.rule

Final row-mass multiplier. "node.mass" multiplies rows for vertex \(i\) by \(\sqrt{\mu_i}\) from the density metadata. "none" leaves rows unweighted.

row.normalize

Optional final row normalization.

min.operator.rank.tol

Relative singular-value tolerance for local derivative regression rank.

max.operator.condition

Maximum allowed weighted local-design condition number.

return.intermediate

Logical. If TRUE, include full logical intermediate derivative matrices.

return.A

Logical. If TRUE, include the compact sparse row operator.

return.B

Logical. If TRUE, include \(A^\top A\).

diagnostics

Logical. If TRUE, include assembly diagnostics.

Value

A list of class "pttf_operator" containing sparse operators, row/vertex provenance, tensor-basis metadata, and diagnostics.

Details

The operator keeps a full logical vertex/component layout internally. For order \(r\), the logical field has one block of \(q_r=\binom{m+r-1}{r}\) components at each vertex. The returned A is compact: it includes rows only for accepted final-order vertex/component blocks, and row.table$full.row records the original full logical row.

For derivative level \(r\), the local regression uses blocks \(\Phi_r(u_{ij})\in\mathbb R^{q_{r-1}\times q_r}\), lifted weights \(W_i^{(r)}=\operatorname{diag}(w_{ij})\otimes I_{q_{r-1}}\), and transported predecessor differences \(K_{r-1}(O_{ij})z_j-z_i\). Unavailable predecessor blocks are never filled with zero; affected neighbors are dropped and recorded.

Examples

n <- 10L
X <- matrix(seq(0, 1, length.out = n), ncol = 1)
adj <- lapply(seq_len(n), function(i) intersect(c(i - 1L, i + 1L), 1:n))
lengths <- Map(function(i, j) abs(X[j, 1] - X[i, 1]), seq_len(n), adj)
geometry <- pttf.geometry(
  X, adj, lengths, graph = "supplied", tangent.dim = 1L
)
pttf.operator(geometry, derivative.order = 2L)
#> PTTF transported-difference operator
#>   derivative order: 2 
#>   A dim: 10 x 10