pdSplineReg()
performs cubic smoothing spline regression in the space of HPD matrices equipped with the
affine-invariant Riemannian metric through minimization of a penalized regression objective function using a
geometric conjugate gradient descent method as outlined in BA11pdSpecEst and BA11bpdSpecEst.
This is a specific implementation of the more general algorithm in BA11pdSpecEst and BA11bpdSpecEst,
setting the part in the objective function based on the first-order finite geometric differences to zero, such that the solutions
of the regression problem are approximating cubic splines.
pdSplineReg(P, f0, lam = 1, Nd, ini_step = 1, max_iter = 100,
eps = 0.001, ...)
a
a
a smoothness penalty, defaults to lam = 1
. If lam = 0
, the penalized curve estimate
coincides with geodesic interpolation of the data points with respect to the Riemannian metric.
If lam
increases to
a numeric value (Nd <= n
) determining a lower resolution of the cubic spline regression estimator to speed up
computation time, defaults to
initial candidate step size in a backtracking line search based on the Armijo-Goldstein
condition, defaults to ini_step = 1
.
maximum number of gradient descent iterations, defaults to max_iter = 100
.
optional tolerance parameter in gradient descent algorithm. The gradient descent procedure exits if the
absolute difference between consecutive evaluations of the objective function is smaller than eps
,
defaults to eps = 1E-3
.
additional arguments for internal use.
A list with three components:
a Nd
estimated cubic smoothing spline
curve of (
a numeric vector containing the costs of the objective function at each gradient descent iteration.
total number of gradient descent iterations.
# NOT RUN {
set.seed(2)
P <- rExamples1D(50, example = 'gaussian', noise.level = 0.1)
P.spline <- pdSplineReg(P$P, P$P, lam = 0.5, Nd = 25)
## Examine matrix-component (1,1)
plot((1:50)/50, Re(P$P[1, 1, ]), type = "l", lty = 2) ## noisy observations
lines((1:25)/25, Re(P.spline$f[1, 1, ])) ## estimate
lines((1:50)/50, Re(P$f[1, 1, ]), col = 2, lty = 2) ## smooth target
# }
Run the code above in your browser using DataLab