I have run a block.PLSDA and am wanting to check the performance with perf(diablo, validation = ‘loo’).
I am getting the following error:
Error in Check.entry.wrapper.mint.block(X = X, Y = Y, indY = indY, ncomp = ncomp, :
At least one block of ‘X’ is not a matrix
Please could you help me with why this might be occuring, I think the blocks are a matrix, see structure of X below:
It looks like the Antigens component is likely to have been automatically converted to a list or a vector as it encompasses only one variable. I’d recommend double checking the class and type of this object.
On another note, why are you using mixOmics when you only have a total of 6 features? This is not the intended use case for the package. mixOmics is focused on dimension reduction - which isn’t a problem when you only have 6 features. While what you’re doing isn’t invalid per say, I think other models and methods might serve you better.
Thanks so much for your quick response, I’ve not found a way to ensure the Antigens component stays as a matrix, but I agree that is likely the issue.
To explain a bit - we have previously identified these 6 features as being the most predictive (came up the most in LOO models) in a block.splsda in a previous study. We wanted to see if these features alone were predictive of our outcome (symptoms) in a follow-up study.