Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with plot.perf_mddsPLS #7

Open
HHoskens opened this issue Jan 23, 2024 · 8 comments
Open

Issues with plot.perf_mddsPLS #7

HHoskens opened this issue Jan 23, 2024 · 8 comments

Comments

@HHoskens
Copy link

Hello,

I am trying to do CV to select lambda for my PLS model, but I get an error when trying to run perf_mddsPLS (can be traced back to the plot.perf_mddsPLS function):

Error in xtfrm.data.frame(x) : cannot xtfrm data frames

The mddsLS function works fine with the same X and Y input variables. I am working in R 4.3.1.

Thanks!

@hlorenzo
Copy link
Owner

Hello,
Thx to try ddsPLS, what is the nature of your matrix ? All numeric ?

@HHoskens
Copy link
Author

Correct. Both are numeric.

@hlorenzo
Copy link
Owner

Can you send me a copy of you df, in private and after noising data ?

@HHoskens
Copy link
Author

It doesn't seem to be data specific; I get the same error when running the "liverToxicity" example. Might be related to the "order" function and some R versions

Screenshot from 2024-01-24 09-06-04

@hlorenzo
Copy link
Owner

Actually the function you try to use is not maintained anymore. I am sorry you had to deal with it.
Consider using the ddsPLS function itself such as

library(ddsPLS)
data(liverToxicity)
X <- scale(liverToxicity$gene)
Y <- scale(liverToxicity$clinic)
model <- ddsPLS(X,Y,doBoot = TRUE,n_B=10,verbose=TRUE)

You will then perform bootstrap operations in order to get variability. In the console you will get something like:
Capture d’écran 2024-01-25 à 22 37 52

and on the plot area:
Capture d’écran 2024-01-25 à 22 39 01

Here the criterion minimized is the difference between R2-Q2. You can consider minimizing Q2 if you wish through the argument criterion. You can also consider the plot function if you wish to explore the built weights (through the argument type put equal to "weightX" or "weightY".

Thank you for reminding me that I must consider rewriting this vignette, I will tell you as soon as this is done. If you have any other question, do not hesitate to ask, I hope you will find interesting stuff in your data

@HHoskens
Copy link
Author

Ok, I will give this a try. Thank you for your help!

and just to be sure, ddsPLS should be downloaded from CRAN (and not github)?

@hlorenzo
Copy link
Owner

hlorenzo commented Jan 26, 2024

On GitHub, favor ddsPLS2 rather than ddsPLS. I work on the version to the CRAN. I will let you know when I have done my job

@hlorenzo
Copy link
Owner

The new version on the CRAN should fix your bug. Please test and tell if everything is ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants