mlr-org / mlr

Machine Learning in R
https://mlr.mlr-org.com
Other
1.64k stars 404 forks source link

surv.glmnet and surv.cvglmnet function X matrix problem #2837

Open ahucephe opened 2 years ago

ahucephe commented 2 years ago

Thank you for your great R package "mlr". I am interested in calculate survival probability for my RNA-seq data. I want to use surv. function in "mlr" package for this. I applied surv.glmboost, surv.gamboost, surv.cforest, surv.ranger etc. for calculating c-index and I did not encounter a problem. However, I get an error when I use surv.glmnet or surv.cvglmnet function. The error is below:

"Error in (function (x, y, family = c("gaussian", "binomial", "poisson", : x should be a matrix with 2 or more columns"

So, how should I define "matrix X" ?

I try to use mlr3 and mlr3proba for survival analysis, but I don't apply feature selection methods.

pat-s commented 2 years ago

@ahucephe

Thanks for posting your issue.

Please provide a reproducible example, preferably using the reprex package.

If this is an issue with {mlr3proba}, I can transfer the issue to this repo. I highly suggest using {mlr} going forward instead of {mlr}. If there's something you missing in {mlr3}, please let us know!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.