ropls package: Recreating scores calculation from an OPLS-DA model
1
0
Entering edit mode
@tordemmers-23730
Last seen 3.8 years ago

Hi I am looking to apply an OPLS-DA model to a separate dataset. As far as I can tell there is only the predict() function for applying the model and it only outputs the predicted class of the data. We are looking to calculate the exact scores of this separate dataset for plotting and have tried manual matrix multiplication of our data with the model coefficients or model loadings but that didn't work correctly. Is there any way to calculate these scores?

Any help is much appreciated!

ropls • 841 views
ADD COMMENT
0
Entering edit mode
Kevin Blighe ★ 3.9k
@kevin
Last seen 6 days ago
Republic of Ireland

From what I understand, the predict() function is just the standard one from stats package; so, have you tried to modify the type parameter that is passed to predict()?

Also, from what I understand, making a 'prediction' via PCA and its related methods just involves a matrix calculation between the variable loadings and the new data. This is elaborated in my own Bioc package, PCAtools: https://github.com/kevinblighe/PCAtools#make-predictions-on-new-data

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 790 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6