Hello,

I found this package while I am searching for rCCA implementation in R. I am trying to use `tune.rcc.R`

to find the optimal lambda that maximize the output CV score.

As I read into the source code in `tune.rcc.R`

, although I understand most part of the `Mfold`

function inside `tune.rcc.R`

, I have a question regarding the second last line:

```
cv.score = cor(xscore, yscore, use = "pairwise")
```

As far as I understand, the whole leave-one-out CV procedures is largely based on the definition in Leurgans et al. (1993). Here are some original wordings from P.729 of the article:

The cross-validation score of a is then defined to be the squared correlation of the n pairs of numbers … We then choose the value of a that maximizes this correlation.

My question is, should the `cv.score`

be the squared correlation, or just correlation? Sorry in advance if I misunderstood the 1993 article since my mathematical background is not very good.

Appreciate any response, thanks!

**References**

Leurgans, S. E., Moyeed, R. A., & Silverman, B. W. (1993). Canonical correlation analysis when the data are curves. *Journal of the Royal Statistical Society*, *55*(3), 725–740.