SPLS tune$choice.ncomp returns null

Hello mixomics team,

Thanks for making this great tool!

I have been attempting to run SPLS on my data, and for some reason, when I use tune.spls with “loo” ncomp returns null (although it still runs, and I can print out the error rates). When I run it with “Mfold”, however, I get a valid value for ncomp. Can someone please explain what may be happening? Could it be that my sample size is too small for leave one out? (It is 138)

here is the line I use:

tune.spls.dat<-tune.spls(X,FMA,ncomp=6,test.keepX=list.keepX,measure="MSE",progressBar=FALSE,light.output=FALSE,validation="loo")

Thanks in advance!

Hi @litoly,

Thanks for using mixOmics.

The loo cross-validation by definition can only be performed once. It is basically an N-fold cross-validation (CV) – where N is the number of samples. The recommendation algorithm uses the performance measures from each repeat and conducts a statistical test to measure the improvement of the model and hence requires nrepeat >= 3. It is therefore not possible to make recommendations with loo CV. You seem to have enough samples to use Mfold as a good alternative to loo but obviously, the best CV scheme depends on your specific study.

Hope it helps

Al

Gotcha- makes sense. Thanks!