Sheila the angel
2014-Aug-08 13:13 UTC
[R] glmnet, Error in apply(nz, 1, median) : dim(X) must have a positive length
Hello all, In glmnet package, cv.glmnet is giving error>data(iris) >df<-data.frame(iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Length,iris$Petal.Width)>x<- as.matrix(df) >y<- as.numeric(iris$Species) >fit = glmnet(x, y, family = "multinomial", type.multinomial = "grouped") >plot(fit, xvar = "lambda", label = TRUE, type.coef = "2norm") >cvfit=cv.glmnet(x, y, family="multinomial", type.multinomial = "grouped",parallel = TRUE) Error in apply(nz, 1, median) : dim(X) must have a positive length In addition: Warning message: from glmnet Fortran code (error code -62); Convergence for 62th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned Why am I getting this error? Thanks [[alternative HTML version deleted]]