pdSplineReg {pdSpecEst} | R Documentation |
Cubic smoothing spline regression for HPD matrices
Description
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 (Boumal and Absil 2011a) and (Boumal and Absil 2011b).
This is a specific implementation of the more general algorithm in (Boumal and Absil 2011a) and (Boumal and Absil 2011b),
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.
Usage
pdSplineReg(P, f0, lam = 1, Nd, ini_step = 1, max_iter = 100,
eps = 0.001, ...)
Arguments
P |
a |
f0 |
a |
lam |
a smoothness penalty, defaults to |
Nd |
a numeric value ( |
ini_step |
initial candidate step size in a backtracking line search based on the Armijo-Goldstein
condition, defaults to |
max_iter |
maximum number of gradient descent iterations, defaults to |
eps |
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 |
... |
additional arguments for internal use. |
Value
A list with three components:
f |
a |
cost |
a numeric vector containing the costs of the objective function at each gradient descent iteration. |
total_iter |
total number of gradient descent iterations. |
Note
This function does not check for positive definiteness of the matrices given as input, and may fail if matrices are close to being singular.
References
Boumal N, Absil P (2011a).
“Discrete regression methods on the cone of positive-definite matrices.”
In IEEE ICASSP, 2011, 4232–4235.
Boumal N, Absil P (2011b).
“A discrete regression method on manifolds and its application to data on SO(n).”
IFAC Proceedings Volumes, 44(1), 2284–2289.
Examples
## 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
## End(Not run)