Use glmnet with family='binomial' parameter
sbrn3 opened this issue · 2 comments
Error in glmnetcr_propn(x_train_k, y_train_k, method = method, lambda = lambdas, : Binary response: Use glmnet with family='binomial' parameter
I believe this is because I only have two groups in my label vector. Is there any way that it may still work?
Hi @sbrn3
Thanks for raising this. You're right that it comes from only having two labels. It would be fixable by a little bit of tweaking.
However I'm not sure that it's actually a good idea to fix it. The idea of psupertime
is to help people identify which genes are varying along their time series. If you only have two labels, then you don't have much of a time-series...! I'll think about whether it's a good idea to allow this (with a warning) or throw an error. (I could definitely make the error message more helpful though.)
Cheers
Will
Realised that I'd actually already addressed this: the internal function check_y
raises an error if there are fewer than 3 labels.