OPLS package with @subsetVi = numeric(0)
1
0
Entering edit mode
Fernando • 0
@a14318da
Last seen 6 weeks ago
Spain

Hi, I am analysing a dataset which has a very little variation across the variable I want to predict (case or control), so when I do the opls with orthoI = NA gives me an error:

opls(dataMatrixfiltered, conditionFc, predI = 1, orthoI= NA)

Error: No model was built because the predictive component was not significant


so I setup orthoI as 0 to get a model of PLS.

When I try to get the confusion matrix using the subsetVi as in the user guide I get the following:

trainVi <- getSubsetVi(experiment.oplsda)
trainVi
numeric(0)


Is there any way to get something to evaluate the model, even if is not a good one?

Thank you!

0
Entering edit mode
@etiennethevenot-8285
Last seen 7 weeks ago
France

Hi,

• To have the getSubsetVi work (and give you the indices of the samples used for training), you must define a training subset when building the model, by using the subset argument in the opls method to specify the indices of those training samples (in the vignette, subset = 'odd' is used to select all samples with odd indices)
• Before checking the performance of your model, you must check that it is valid (i.e. not built on noise): as explained in section 4.5.1 of the vignette, your pQ2 value in the title of the bottom right graphics should be below 5%
• If the model is valid, two performance metrics are available on the legend of the score plot: Q2Y (cross-validated R2) and RMSEE (estimated RMSE by cross-validation). You may also compute other metrics (such as accuracy) by building confusion matrices, as you suggested in your question.

Best regards,

Etienne.