Hello,

I am new to mixOmics here and currently doing my master thesis. I have met questions in sPLS-DA models and would be so kind of you if you could help or give some advice.

Size of my data is 42*47, because the sample size is small I use LOOCV for both model tuning and model validation. And the aim of the project includes feature selection, so I tried the sparse version. I followed the procedure from the examples for model tuning and feature selection and write the following for validation purpose:

pred <- vector()

for (i in 1:42){

pred[i] <- predict(splsda(x[-i,],y[-i], ncomp = ncomp, keepX = select.keepX), t(x[i,]) ,dist = “max.dist”)$class$max.dist[,4]

}

so that I can get the prediction accuracy and confusion matrix based on the 4th component.

However, this is using only one component but it is suggested that the number of components needed is 8. My question is: is there a way to combine all the information from all components and get the prediction result instead of using only one component?

Thank you very much for helping.