Perf block.plsda error

Hi,

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:
image

Thanks a lot for your help.

Best,
Emma

1 Like

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.

1 Like

Hi Max,

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.

I’ve thought of something which potentially might be causing your issue. I’ll look into it today, but let me know if you’ve resolved it.

Cheers

Hi Max,

I managed to get it to work by adding another variable into the antigens block, which was just all 0’s. Not sure if that workaround is a bit dubious…

Best,
Emma

This makes me think I might be right with my guess. I’ll let you know once I’ve had a chance to look into it