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:
smooth_basis— Penalized least squares with continuous roughness penaltysmooth_basis_gcv— GCV-optimal smoothing parameter selectionbspline_penalty_matrix/fourier_penalty_matrix— Roughness penalty matrices
Structs§
- Basis
Nbasis CvConfig - Configuration for cross-validation-based basis selection.
- Basis
Nbasis CvResult - Result of nbasis selection.
- FdPar
- Functional data parameter object (basis + penalty specification).
- Smooth
Basis GcvConfig - Configuration for GCV-based smoothing parameter selection.
- Smooth
Basis Result - Result of basis-penalized smoothing.
Enums§
- Basis
Criterion - Criterion for nbasis selection.
- Basis
Type - 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.