sunduanchen / Scissor

Scissor package
GNU General Public License v3.0
179 stars 31 forks source link

fit0$lambda.min is NULL,causing 0 Scissor cells detected. #45

Closed JHovelly closed 1 year ago

JHovelly commented 1 year ago

Thank you for your algorithm, I always get 0 Scissor cells, no matter how I change the parameter. I found that in this part of code

fit0 <- APML1(X, Y, family = family, penalty = "Net", 
              alpha = alpha[i], Omega = network, nlambda = 100, 
              nfolds = min(10, nrow(X)))
fit1 <- APML1(X, Y, family = family, penalty = "Net", 
              alpha = alpha[i], Omega = network, lambda = fit0$lambda.min)

fit0$lambda.min get NULL, so I changed it to min(fit0$fit$lambda) and successfully solved this problem.

All the best, J Hovelly

JHovelly commented 1 year ago

The idea was wrong so I closed this issue.