# findAlphaVopt: Find the optimal smoothing parameters in FCP_TPA using GCV In MFPCA: Multivariate Functional Principal Component Analysis for Data Observed on Different Dimensional Domains

## Description

These functions find the optimal smoothing parameters α_v, α_w for the two image directions (v and w) in the FCP_TPA algorithm based on generalized cross-validation, which is nested in the tensor power algorithm. Given a range of possible values of α_v (or α_w, respectively), the optimum is found by optimizing the GCV criterion using the function `optimize`.

## Usage

 ```1 2 3``` ```findAlphaVopt(alphaRange, data, u, w, alphaW, OmegaW, GammaV, lambdaV) findAlphaWopt(alphaRange, data, u, v, alphaV, OmegaV, GammaW, lambdaW) ```

## Arguments

 `alphaRange` A numeric vector with two elements, containing the minimal and maximal value for the smoothing parameter that is to be optimized. `data` The tensor containing the data, an array of dimensions ```N x S1 x S2```. `u, v, w` The current value of the eigenvectors u_k, v_k, w_k (not normalized) of dimensions `N`, `S1` and `S2`. `GammaV, GammaW` A matrix of dimension `S1 x S1` (`GammaV` in `findAlphaVopt`) or `S2 x S2` (`GammaW` in `findAlphaWopt`), containing the eigenvectors of the penalty matrix for the image direction for which the optimal smoothing parameter is to be found. `lambdaV, ` lambdaW A numeric vector of length `S1`(`lambdaV` in `findAlphaVopt`) or `S2` (`lambdaW` in `findAlphaWopt`), containing the eigenvalues of the penalty matrix for the image direction for which the optimal smoothing parameter is to be found. `alphaV, alphaW` The current value of the smoothing parameter for the other image direction (α_w for `findAlphaVopt` and α_v for `findAlphaWopt`), which is kept as fixed. `OmegaV, ` OmegaW A matrix of dimension `S1 x S1` (`OmegaV` in `findAlphaWopt`) or `S2 x S2` (`OmegaW` in `findAlphaVopt`), the penalty matrix for other image direction.

## Value

The optimal α_v (or α_w, respectively), found by optimizing the GCV criterion within the given range of possible values.

## Functions

• `findAlphaWopt`:

## References

G. I. Allen (2013), "Multi-way Functional Principal Components Analysis", IEEE International Workshop on Computational Advances in Multi-Sensor Adaptive Processing.

J. Z. Huang, H. Shen and A. Buja (2009), "The Analysis of Two-Way Functional Data Using Two-Way Regularized Singular Value Decomposition". Journal of the American Statistical Association, Vol. 104, No. 488, 1609 – 1620.

`FCP_TPA`, `gcv`