Skip to main content

Module smooth_basis

Module smooth_basis 

Source
Expand description

Basis-penalized smoothing with continuous derivative penalties.

This module implements smooth.basis from R’s fda package. Unlike the discrete difference penalty used in P-splines (basis.rs), this uses continuous derivative penalties: min ||y - Φc||² + λ·∫(Lf)² dt.

Key capabilities:

Structs§

BasisNbasisCvConfig
Configuration for cross-validation-based basis selection.
BasisNbasisCvResult
Result of nbasis selection.
FdPar
Functional data parameter object (basis + penalty specification).
SmoothBasisGcvConfig
Configuration for GCV-based smoothing parameter selection.
SmoothBasisResult
Result of basis-penalized smoothing.

Enums§

BasisCriterion
Criterion for nbasis selection.
BasisType
Basis type for penalized smoothing.

Functions§

basis_nbasis_cv
Select the optimal number of basis functions using multiple criteria (R’s fdata2basis_cv).
basis_nbasis_cv_with_config
Select the optimal number of basis functions using a config struct.
bspline_penalty_matrix
Compute the roughness penalty matrix for B-splines via numerical quadrature.
fourier_penalty_matrix
Compute the roughness penalty matrix for a Fourier basis.
smooth_basis
Perform basis-penalized smoothing.
smooth_basis_gcv
Perform basis-penalized smoothing with GCV-optimal lambda.
smooth_basis_gcv_with_config
Perform basis-penalized smoothing with GCV-optimal lambda using a config struct.