# pdSplineReg: Cubic smoothing spline regression for HPD matrices In pdSpecEst: An Analysis Toolbox for Hermitian Positive Definite 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 \insertCiteBA11pdSpecEst and \insertCiteBA11bpdSpecEst. This is a specific implementation of the more general algorithm in \insertCiteBA11pdSpecEst and \insertCiteBA11bpdSpecEst, 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

 ```1 2``` ```pdSplineReg(P, f0, lam = 1, Nd, ini_step = 1, max_iter = 100, eps = 0.001, ...) ```

## Arguments

 `P` a (d,d,n)-dimensional array corresponding to a length n sequence of (d, d)-dimensional noisy HPD matrices. `f0` a (d,d,n)-dimensional array corresponding to an initial estimate of the smooth target curve of (d, d)-dimensional HPD matrices. `lam` 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 ∞, the penalized regression estimator is approximately a fitted geodesic curve. `Nd` a numeric value (`Nd <= n`) determining a lower resolution of the cubic spline regression estimator to speed up computation time, defaults to n. `ini_step` initial candidate step size in a backtracking line search based on the Armijo-Goldstein condition, defaults to `ini_step = 1`. `max_iter` maximum number of gradient descent iterations, defaults to `max_iter = 100`. `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 `eps`, defaults to `eps = 1E-3`. `...` additional arguments for internal use.

## Value

A list with three components:

 `f ` a (d, d, N_d)-dimensional array corresponding to a length `Nd` estimated cubic smoothing spline curve of (d, d)-dimensional HPD matrices. `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.

\insertAllCited

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```## 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) ```

pdSpecEst documentation built on Jan. 8, 2020, 5:08 p.m.