Computes Demirkaya two-scale DNN (TDNN) weights using the exact rank-weight
table (tdnn_rank_table_exact()). TDNN is a signed linear combination of
two single-scale exact DNN tables at orders s1 and s2; the combination
coefficients are chosen to cancel the leading bias term in the DNN MSE
expansion.
Usage
weights_tdnn_exact(
X,
X0 = NULL,
x0 = NULL,
distance = "l2",
s1,
s2,
dim = NULL,
ctx = NULL,
return = c("W")
)Arguments
- X
Numeric matrix (n x p).
- X0
Numeric matrix (m x p); mutually exclusive with
x0.- x0
Numeric length-p single target (convenience for m = 1).
- distance
Distance spec or registered name (e.g.,
"l2").- s1
Positive integer; smaller U-statistic order (
s1 < s2 <= n).- s2
Positive integer; larger U-statistic order.
- dim
Positive integer; localization dimension. Defaults to
ncol(X)whenNULL.- ctx
Optional context passed through to distance and rank-weight evaluators.
- return
Character vector of extras to include; any of
c("W", "ord", "ranks", "dx").
Value
A weights_result object (same structure as
weights_dnn_exact()).