Chapter 28 Appendix: Notation and Function Reference

This appendix consolidates the notation used across the book and maps each object to its primary R implementation pattern. It is intended as a quick lookup for readers moving between theoretical sections and code-first workflows.

Unless otherwise noted, all functions in this appendix come from the NNS package. In executable code, load the package once and then call functions directly as shown in the table entries below.

library(NNS)

The crosswalk gives the intended Python counterpart names in the nns package (distributed as ovvo-nns; see the Preface for conventions). R is the canonical implementation for this edition. New arguments, output labels, and numerical repairs must be checked against the installed Python version before assuming implementation parity:

import nns

28.1 R–Python Function Crosswalk

The R name is the canonical reference used throughout the book; the Python name follows the snake_case convention.

R function Python function Purpose
LPM / UPM nns.lpm / nns.upm Lower / upper partial moments
LPM.ratio / UPM.ratio nns.lpm_ratio / nns.upm_ratio Frequency probabilities at degree zero; directional area shares at positive degrees
LPM.VaR / UPM.VaR nns.lpm_var / nns.upm_var Lower / upper tail quantile inversion
Co.LPM / Co.UPM nns.co_lpm / nns.co_upm Concordant co-partial moments
D.LPM / D.UPM nns.d_lpm / nns.d_upm Divergent co-partial moments
PM.matrix nns.pm_matrix Partial-moment covariance decomposition
NNS.dep nns.nns_dep Nonlinear dependence measure
NNS.copula nns.nns_copula Multivariate dependence / copula view
NNS.caus nns.nns_causation Directional causation diagnostic
NNS.CDF nns.nns_cdf Partial-moment CDF estimation
NNS.ANOVA nns.nns_anova Partial-moment ANOVA certainty
NNS.SS nns.nns_ss Stochastic superiority
NNS.FSD / NNS.SSD / NNS.TSD nns.fsd / nns.ssd / nns.tsd Stochastic dominance tests
NNS.part nns.nns_part Recursive mean-split partitioning
NNS.reg nns.nns_reg Nonparametric regression
NNS.boost nns.nns_boost Feature-screening ensemble learner
NNS.stack nns.nns_stack Optimized stacked ensemble
NNS.seas nns.nns_seas Seasonality detection
NNS.ARMA nns.nns_arma Nonlinear autoregressive forecasting
NNS.ARMA.optim nns.nns_arma_optim Seasonal-factor optimization
NNS.VAR nns.nns_var Nonparametric vector autoregression
NNS.meboot nns.nns_meboot Maximum-entropy bootstrap
NNS.MC nns.nns_mc Meboot-based Monte Carlo wrapper
NNS.mode nns.nns_mode Mode estimation
NNS.moments nns.nns_moments Partial-moment classical moments
NNS.diff / dy.dx nns.nns_diff / nns.dy_dx Numerical differentiation
NNS.norm / NNS.rescale nns.nns_norm / nns.nns_rescale Normalization and rescaling

28.2 Core directional operators and partial moments

Symbol Definition Interpretation R function / pattern
\(x^+\) \(\max(x,0)\) Positive-part operator pmax(x, 0)
\((X-t)^+\) \(\max(X-t,0)\) Deviation above benchmark \(t\) internal to UPM(...)
\((t-X)^+\) \(\max(t-X,0)\) Deviation below benchmark \(t\) internal to LPM(...)
\(L_r(t;X)\) \(E[(t-X)_+^r]\) Lower partial moment, degree \(r\) LPM(r, t, X)
\(U_r(t;X)\) \(E[(X-t)_+^r]\) Upper partial moment, degree \(r\) UPM(r, t, X)
\(L_r/(L_r+U_r)\) Degree-\(r\) lower ratio Frequency below \(t\) at degree zero; lower severity share otherwise LPM.ratio(r, t, X)
\(U_r/(L_r+U_r)\) Degree-\(r\) upper ratio Frequency above \(t\) at degree zero; upper severity share otherwise UPM.ratio(r, t, X)

28.3 Co-partial moments, dependence, and causation

Symbol Definition / role R function
\(CoLPM, CoUPM\) Concordant lower/upper co-partial moments Co.LPM(...), Co.UPM(...)
\(DLPM, DUPM\) Divergent lower/upper co-partial moments D.LPM(...), D.UPM(...)
\(NNS.dep(X,Y)\) Global nonlinear dependence measure NNS.dep(x, y)
\(NNS.copula(X)\) Nonparametric dependence geometry / copula view NNS.copula(cbind(x, y))
\(NNS.caus(X,Y)\) Directional causation diagnostic NNS.caus(x, y)

28.4 Distribution comparison, dominance, and interval objects

Symbol Definition / role R function
\(F^{(0)}(t)\) Degree-zero empirical CDF (step measure) ecdf(x)(t) or LPM.ratio(0, t, x)
\(F^{(1)}(t)\) Degree-one area ratio: the share of deviation area below \(t\), not \(P(X \le t)\) LPM.ratio(1, t, x)
\(p = P(X' > Y')\) Directional exceedance probability for pairwise comparison estimated by cross-sample indicator averages
\(\text{Certainty}_{\text{ANOVA}}\) Descriptive target agreement with a finite-sample adjustment; not a p-value or power NNS.ANOVA(...)
FSD / SSD / TSD Ordinary dominance at the stated orders; the legacy continuous FSD option instead uses Omega/expectile order NNS.FSD(...), NNS.SSD(...), NNS.TSD(...)
\(Q^-_{d}(\alpha)\) Lower degree-\(d\) quantile LPM.VaR(alpha, degree = d, x)
\(Q^+_{d}(\alpha)\) Upper degree-\(d\) quantile UPM.VaR(alpha, degree = d, x)
Directional band \([Q^-_d(\alpha/2),Q^+_d(\alpha/2)]\): frequency target at degree zero, severity target otherwise; future coverage needs validation LPM.VaR(...) + UPM.VaR(...)

LPM.VaR(percentile, degree, x) Lower-tail threshold operator obtained by inverting the degree-specific lower partial-moment representation. Interpretation by degree:

  • degree = 0: type-7 interpolated empirical lower quantile,
  • degree = 1: severity-weighted lower threshold based on directional magnitude,
  • degree = 2: extreme-deviation-sensitive lower threshold. In finance, the degree-zero case is commonly called VaR, but the operator is more general than that label.

UPM.VaR(percentile, degree, x) Upper-tail analog of LPM.VaR, used for right-tail threshold selection and interval construction.

28.5 Directional Decision Regions Crosswalk (Classical → NNS)

To maintain continuity with Chapter 23’s directional decision-region framing, the table below maps common classical statistics and procedures to their directional NNS counterparts.

Classical statistic / workflow Typical classical role Directional NNS counterpart Reference chapter Notes
Pearson correlation Linear association summary NNS.dep(x, y) Chapter 10 Captures nonlinear and asymmetric dependence, not only linear co-movement.
Parametric VaR / empirical quantile VaR Tail-loss thresholding LPM.VaR(alpha, degree, x) (degree-dependent) Chapter 16 Degree controls sensitivity to tail severity beyond degree-0 quantiles.
Upper-tail quantile threshold Right-tail risk/opportunity cutoff UPM.VaR(alpha, degree, x) (degree-dependent) Chapter 16 Upper-tail analog to LPM.VaR for asymmetric interval construction.
Classical ANOVA (mean-comparison test) Group-level location comparison NNS.ANOVA(...) (degree-dependent CDF benchmarking) Chapter 15 Agreement certainty is benchmarked through directional CDF-style deviations.
Linear Granger-style directional inference Lead-lag direction under linear structure NNS.caus(x, y) Chapter 14 Measures directional lagged association; does not by itself identify a structural cause or condition on own-history dynamics.
Copula / Joint Tail Dependency Joint probability of concurrent outcomes Co.LPM(degree_lpm, x, y, target_x, target_y) / Co.UPM(degree_upm, x, y, target_x, target_y) Chapters 10 and 13 Degree zero counts joint events; positive degrees measure joint directional magnitudes, with the requisite finite moments.
Mean-variance interval heuristics Uncertainty bands under Gaussian assumptions LPM.VaR(...) + UPM.VaR(...) (degree-dependent bounds) Chapter 17 Constructs directional thresholds without selecting a normal family; coverage requires a separate sampling and calibration argument.

28.6 Regression and forecasting workflow objects

Symbol Definition / role R function Reference chapter
\(\hat m_{NNS}(x)\) NNS fitted location; the mean reducer targets conditional means under the stated conditions NNS.reg(x, y) Chapter 22
Global residual distribution Pooled in-sample residuals, not a local conditional error law via NNS.reg(...)$Fitted.xy$residuals outputs Chapter 22
Residual band at \(x_0\) Fitted location plus global residual-quantile offsets NNS.reg(..., point.est = x0, confidence.interval = ...) Chapter 17
Regime-specific directional dependence Time-local / state-local dependence NNS.dep(...) on rolling/segmented windows Chapter 10

28.7 A.3 Technical Note: Adaptive Order and Consistency Conditions

Chapter 18 gives a conditional consistency argument for cell means under an appropriate sampling and partition design. Its assumptions include shrinking cell diameters, diverging local occupancy, control of conditional variation, and appropriate locality of any subsequent interpolation or averaging. Response-adaptive partition selection requires its own conditions; a proof for predictor-only partitions cannot simply be reused after selection on outcomes.

The current default order heuristic is bounded. A fixed minimum cell size does not establish diverging occupancy, and a bound on depth does not establish shrinking diameter as the sample grows. The default implementation therefore does not inherit a universal consistency theorem or an oracle convergence rate from the abstract construction. Such claims require a specified sequence of depths/neighbour counts and a proof that the actual estimator satisfies the conditions. Other location reducers, including gravity, need analysis for their own targets rather than an automatic conditional-mean claim.

28.8 Validation and compatibility choices

Function Current choice Interpretation
NNS.reg, NNS.stack type = "REG" Explicit numeric regression, including two-valued responses; predictions are not restricted to class labels.
NNS.ARMA.optim bias.correction = "none" (default) or "split" No shift by default; split estimates the shift earlier and accepts it later within internal validation. Outer evaluation is still needed.
NNS.VAR validation = "pipeline" or "observed" Pipeline predicts the held-out feature rows from the earlier origin; observed is the conditional-regression compatibility mode.
NNS.seas dispersion = "auto" or "absolute" Auto preserves the historical sign-based CV/Gini choice; absolute supports translation-invariant interval-scale comparisons.
NNS.meboot expand.sd and expand.residual.sd Level and residual expansion are separate; force.clt uses an iid mean-scale reference.
NNS.FSD type = "continuous" Numerical area order is retained and returns OMEGA result labels.

Use the installed package help for complete signatures. The table names statistical choices; it does not replace the assumptions and qualifications in the corresponding chapters.