Skip to contents

Builds the fixed S-LPL-TF operator pair. The LPL component \(A_{\mathrm{LPL}}\) is the accepted self-excluded LPL-TF residual operator from lpl.tf.operator. The synchronization component \(C_{\mathrm{sync}}\) compares inclusive local polynomial prediction maps over overlapping supports.

Usage

slpl.tf.operator(
  X,
  adj.list = NULL,
  weight.list = NULL,
  graph = NULL,
  graph.stage = "final",
  anchor.index = NULL,
  anchor.coordinates = NULL,
  degree = 2L,
  support.type = c("adaptive.radius", "knn", "fixed.radius"),
  support.size = NULL,
  radius = NULL,
  min.support = NULL,
  support.buffer = 3L,
  kernel = c("epanechnikov", "triangular", "gaussian", "tricube"),
  coordinate.method = c("coordinates", "local.pca"),
  chart.dim = NULL,
  support.metric = c("auto", "coordinates", "graph.geodesic"),
  auto.chart.support.metric = c("coordinates", "operator", "both"),
  auto.chart.selection.metric = c("coordinates", "operator"),
  row.normalize = c("l2", "none", "l1"),
  local.solver = c("auto", "normal.equations", "qr", "svd"),
  normal.equations.max.condition = 1e+08,
  duplicate.action = c("keep", "error"),
  drop.rank.deficient = TRUE,
  sync.row.normalize = c("l2"),
  sync.min.norm = 1e-12,
  verbose = FALSE,
  ...
)

Arguments

X

Numeric coordinate matrix with one row per observation.

adj.list, weight.list

Optional supplied undirected graph adjacency and positive edge-length lists using 1-based vertex indices.

graph

Optional graph object returned by dgraphs::create.rknn.graph() or a list containing adj.list/weight.list or adj_list/weight_list.

graph.stage

Graph stage to extract from graph: "final", "raw", or "pruned".

anchor.index

Optional integer vector of observed anchor/target indices. The current implementation supports observed anchors only.

anchor.coordinates

Reserved for later off-observation anchors; this implementation requires NULL.

degree

Polynomial degree. The current implementation supports 0L, 1L, and 2L.

support.type

Coordinate support rule. "knn" uses the nearest support.size candidates including the target before self exclusion. "adaptive.radius" uses the nearest min.support positive predictors after self exclusion. "fixed.radius" uses all points within radius.

support.size

Positive integer for support.type = "knn".

radius

Positive coordinate radius for support.type = "fixed.radius".

min.support

Minimum number of positive-weight predictors after self exclusion. If NULL, uses choose(ncol(X) + degree, degree) + support.buffer.

support.buffer

Nonnegative integer added to the local polynomial design size when choosing default supports.

kernel

Kernel used to weight local predictors by distance.

coordinate.method

Coordinate chart used for the local polynomial design. "coordinates" uses centered ambient coordinates; "local.pca" uses a deterministic local PCA chart on the selected support.

chart.dim

Chart dimension. For "coordinates", this must be NULL or ncol(X). For "local.pca", NULL defaults to ncol(X). The special value "auto" estimates a single chart dimension from observed-coordinate local PCA spectra only, without using responses, truth values, latent coordinates, or labels.

support.metric

Support-distance rule. "coordinates" uses Euclidean coordinate distances; "graph.geodesic" uses shortest-path distances in the supplied graph. "auto" uses graph geodesics when a graph is supplied and coordinate distances otherwise.

auto.chart.support.metric

Support system used when chart.dim = "auto". "coordinates" uses Euclidean coordinate neighborhoods, "operator" uses the resolved operator support metric, and "both" computes both diagnostics side by side.

auto.chart.selection.metric

Which auto chart-dimension diagnostic to use for the fitted operator when auto.chart.support.metric = "both". The default "coordinates" preserves historical behavior.

row.normalize

Complete-row normalization rule applied after setting target coefficient +1 and predictor coefficients -h_ij.

local.solver

Local linear algebra rule.

normal.equations.max.condition

Maximum condition number for local.solver = "auto" to use normal equations.

duplicate.action

Duplicate coordinate policy.

drop.rank.deficient

Logical. The current implementation requires TRUE.

sync.row.normalize

Synchronization-row normalization. The current implementation uses "l2" by default.

sync.min.norm

Minimum raw synchronization-row norm. Rows below this threshold are dropped with metadata.

verbose

Logical. Reserved for diagnostic messages.

...

Reserved.

Value

A list of class "slpl_tf_operator" containing A_LPL, C_sync, row metadata, diagnostics, settings, and the embedded "lpl_tf_operator".

Examples

X <- matrix(seq(0, 1, length.out = 18), ncol = 1)
slpl.tf.operator(X, degree = 1L, support.type = "knn",
                 support.size = 7L, kernel = "gaussian")
#> Synchronized Local Polynomial Lifting Trend-Filtering operator
#>   observations: 18 
#>   LPL rows: 18 
#>   synchronization rows: 406 
#>   degree: 1 
#>   support type: knn 
#>   support metric: coordinates 
#>   stacked operator rank: 16 
#>   stacked operator nullity: 2