Hi,
I have a proteomics data set with a small number of samples (10 samples x 13872 proteins), and was trying to run an sPCA on it. Because the number of samples is too low, I tried to run a LOO-CV, so I set up the following code:
# define ncomp
ncomp = 2
# set a list of keepX values
keepX <- c(rep(5,100,5),
rep(100,500,10))
# tune sPCA with parameters
set.seed(1001)
tune.spca.sol <- tune.spca(X = soluble.imput,
ncomp = ncomp,
test.keepX = keepX,
folds = nrow(soluble.imput),
nrepeat = 100)
However, I get the following message:
Error in tune.spca(X = soluble.imput, ncomp = ncomp, test.keepX = keepX, :
'folds' must be an integer > 2 and <= floor(nrow(X)/3)=3
If I run with folds = 3, it seems to run fine… Any advice on what I should do in this case?
Thanks