V paramater in tune.spls

Hello!
We’re currently running the tune.spls function (regression) and find that one of the results is a parameter named “V”. The documentation doesn’t quite clarify what this parameter means, other than “u” being related to the X matrix and “t” to the Y matrix. Both values return different correlation/RSS values, so we’re not quite sure which value we should focus on.

Is there any extra information you could provide us? Thanks!

Before a model is trained, latent components are calculated and are referred to as the “actual” components. We then train the model on nfold-1 folds of the data and use it to generate components using the testing data, these are referred to as “predicted” components. We use the degree of agreement between the “actual” and “predicted” components to evaluate the performance of the model.

sPLS produces components for both the X and Y dataframe (as their covariance is to be maximised). These components are referred to as “t” and “u” respectively. So, if we consider the first row of the dataframe shown below, it shows the average correlation between the actual and predicted Y components is equal to 0.9998930877. Row 10 shows the correlation between the actual and predicted X components is 0.9978796553. In both cases, this was when keepX = 40 and keepY = 3. Hence, the V column merely refers to which set of components we are considering.

Hope this clarifies things a bit for you. Feel free to ask any follow up questions you may have!

Cheers,
Max.

library(mixOmics)

data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic

list.keepX <- c(seq(40, 50, 5))
list.keepY <- c(3:5) 

tune.spls.liver <- tune.spls(X, Y, ncomp = 1,
                             test.keepX = list.keepX,
                             test.keepY = list.keepY,
                             nrepeat = 1, folds = 10)

tune.spls.liver$measure.pred[, -c(6,7,8)]
#>    keepX keepY V measure comp         mean sd
#> 1     40     3 u     cor    1 0.9998930877 NA
#> 2     45     3 u     cor    1 0.9998952914 NA
#> 3     50     3 u     cor    1 0.9999516103 NA
#> 4     40     4 u     cor    1 0.9995337961 NA
#> 5     45     4 u     cor    1 0.9997414874 NA
#> 6     50     4 u     cor    1 0.9996867081 NA
#> 7     40     5 u     cor    1 0.9995355387 NA
#> 8     45     5 u     cor    1 0.9995969478 NA
#> 9     50     5 u     cor    1 0.9995245654 NA
#> 10    40     3 t     cor    1 0.9978796553 NA
#> 11    45     3 t     cor    1 0.9958649266 NA
#> 12    50     3 t     cor    1 0.9970406440 NA
#> 13    40     4 t     cor    1 0.9970983724 NA
#> 14    45     4 t     cor    1 0.9941250664 NA
#> 15    50     4 t     cor    1 0.9975271652 NA
#> 16    40     5 t     cor    1 0.9963034961 NA
#> 17    45     5 t     cor    1 0.9970498316 NA
#> 18    50     5 t     cor    1 0.9985226770 NA
#> 19    40     3 u     RSS    1 0.0006155628 NA
#> 20    45     3 u     RSS    1 0.0007218943 NA
#> 21    50     3 u     RSS    1 0.0002648458 NA
#> 22    40     4 u     RSS    1 0.0033918068 NA
#> 23    45     4 u     RSS    1 0.0020396552 NA
#> 24    50     4 u     RSS    1 0.0021525298 NA
#> 25    40     5 u     RSS    1 0.0041183628 NA
#> 26    45     5 u     RSS    1 0.0036074517 NA
#> 27    50     5 u     RSS    1 0.0035910362 NA
#> 28    40     3 t     RSS    1 0.0983538041 NA
#> 29    45     3 t     RSS    1 0.2293388330 NA
#> 30    50     3 t     RSS    1 0.1678618885 NA
#> 31    40     4 t     RSS    1 0.2169472130 NA
#> 32    45     4 t     RSS    1 0.4099862830 NA
#> 33    50     4 t     RSS    1 0.1648951826 NA
#> 34    40     5 t     RSS    1 0.1875397640 NA
#> 35    45     5 t     RSS    1 0.2204701932 NA
#> 36    50     5 t     RSS    1 0.1220872036 NA

Created on 2022-06-22 by the reprex package (v2.0.1)

1 Like

Thank you Max for your quick and thorough reply.

Reading over your reply again I noticed you assigned “t” to the X components, while the “u” is associated to the Y components. Was this a typo or is this the true assignment of these variables?

Best.
-H

This is the proper assignment of the variables. An exert from the the book:

image

1 Like