Skip to contents

Extract the linear map from responses to predictions for a supported fitted model. R selects the method from the class of object.

Usage

smoother.matrix(object, ...)

# Default S3 method
smoother.matrix(object, ...)

Arguments

object

An "lps" or "malps" fitted object.

...

Method-specific controls: check.tol for LPS; max.n and allow.robust for MALPS. Unrecognized arguments are errors.

Value

A numeric matrix mapping training responses to predictions. See the method help for dimensions and attributes.

Details

smoother.matrix.lps requires a fixed-configuration Gaussian LPS fit using the R backend, the orthogonal polynomial drop basis, singleton tuning grids, and fixed chart dimension. It returns one row per evaluation point and checks that the matrix reproduces the stored raw fitted values.

smoother.matrix.malps returns a training-point matrix conditional on stored supports, charts, and weights. Its default size limit is max.n = 1000L. Robust fits are rejected unless allow.robust = TRUE; that option freezes the final robust weights and does not represent how those weights change with the response.

Neither method represents uncertainty from repeating model selection.

Migration

Replace lps.smoother.matrix(fit, ...) and malps.smoother.matrix(fit, ...) with smoother.matrix(fit, ...). Existing method-specific arguments and restrictions are preserved. The former functions are no longer exported; their help aliases lead to the corresponding methods.

Examples

X <- matrix(seq(0, 1, length.out = 20), ncol = 1)
fit <- fit.malps(X, X[, 1]^2, degree = 1L,
                 support.type = "knn", support.size = 8L)
S <- smoother.matrix(fit)
max(abs(as.vector(S %*% fit$y) - predict(fit)))
#> [1] 6.661338e-16