Tuning failing in MINT.splsda

I am trying to run the tuning step for a MINT.splsda. I can get the example stemcell data to run normally, but every time I run my data I get this error message. My sample sizes are quite small (see table) and I have 50 variables. Trying different measure, and dist, did not help. The rest of the MINT.plsda steps were running fine up until this stage.
Calling ‘tune.mint.splsda’ with Leave-One-Group-Out Cross Validation (nrepeat = 1)
Error in [<-(*tmp*, classification == groups[j], j, value = 1) :
subscript out of bounds

                     Exp 1 Exp2 Exp3

Naive Mother 7 3 7
Infected Mother 9 7 9

Also, why do we use tune here and not tune.mint.splsda?
Thank you in advance

Note: by playing around with the number of variables like this, I find that reducing the number of variables does reduce the error rate:
res.mint.splsda ← mint.splsda(X, Y, study = study, ncomp = 2, keepX = c(10, 30))
perf.mint ← perf(res.mint.splsda, dist = “centroids.dist”)
perf.mint$global.error

Hi @kzpx67,

If you haven’t checked it out already this webpage we have a lot of details on the tuning process and how it works. Its likely that your low sample numbers are what is causing the error during tuning. An alternative approach is to simply extract the loadings of your features and use that to identify your important discriminating features (see this post).

When you run tune() on a mint.splsda object, it will internally run tune.mint.splsda(), so you can use either function they are the same.

Cheers,
Eva