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]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to