Skip to contents

Builds a compact one-row diagnostic table for a fitted local polynomial smoother. The table records the requested backend, the backend actually used, the requested chart-dimension rule, the resolved chart dimension, selected tuning parameters, and whether the fit follows the current deployable local-PCA auto-dimension contract.

Usage

lps.backend.diagnostics(object)

Arguments

object

A fitted "lps" object.

Value

A one-row data.frame with backend, chart-dimension, selection, candidate-count, and policy fields.

Details

The current backend policy is conservative: backend = "auto" uses the C++ backend for ambient-coordinate LPS, but uses the R reference backend for coordinate.method = "local.pca". The native local-PCA backend "cpp.local.pca" remains an explicit opt-in backend. This helper makes that policy visible in reports and downstream experiment manifests without changing the default.

For real-data local-PCA runs, the deployable chart-dimension contract is the ordinary local.chart.method = "pca" path with chart.dim = "auto" or "local.auto" and observed-covariate auto-dimension diagnostics. In P7-style experiments this is paired with auto.chart.support.metric = "both" and auto.chart.selection.metric = "operator". The experimental "second.order.svd" chart path is reported explicitly but is not certified by this deployable local-PCA contract. For LPS itself, which uses coordinate supports, the operator-support diagnostic is currently equivalent to the coordinate-support diagnostic; the fields are still recorded so the same manifest schema can be shared with LPL-TF and S-LPL-TF experiments.

Examples

X <- matrix(seq(0, 1, length.out = 16), ncol = 1)
fit <- fit.lps(X, X[, 1]^2, support.grid = 6L, degree.grid = 1L,
               kernel.grid = "gaussian", cv.folds = 2L, backend = "R")
lps.backend.diagnostics(fit)
#>   method.id outcome.family coordinate.method local.chart.method
#> 1       lps       gaussian       coordinates                pca
#>   local.chart.method.effective backend.requested backend.used
#> 1                         none                 R            R
#>   backend.auto.policy requested.chart.dim resolved.chart.dim chart.dim.auto
#> 1          explicit_R                NULL                  1          FALSE
#>   chart.dim.local.auto chart.dim.mode chart.dim.by.anchor.n
#> 1                FALSE        ambient                    16
#>   chart.dim.by.anchor.min chart.dim.by.anchor.max auto.chart.support.metric
#> 1                       1                       1               coordinates
#>   auto.chart.selection.metric auto.chart.support.metric.selected
#> 1                 coordinates                               <NA>
#>   auto.chart.fallback.used auto.chart.n.anchors auto.chart.median.local.dim
#> 1                       NA                   NA                          NA
#>   selected.support.size selected.degree selected.kernel
#> 1                     6               1        gaussian
#>   selected.bandwidth.multiplier selected.cv.rmse.observed
#> 1                             1                0.07000098
#>   selected.cv.brier.observed selected.cv.logloss.observed
#> 1                         NA                           NA
#>                 design.basis design.drop.tol ridge.multiplier.grid
#> 1 orthogonal.polynomial.drop           1e-08         0;1e-10;1e-08
#>   ridge.condition.max bandwidth.multiplier.grid unstable.action candidate.count
#> 1               1e+12                         1              na               1
#>   local.pca.real.data.contract
#> 1                        FALSE