R/predict.cv.gcdnet.R

predict.cv.gcdnet <- function(object, newx, s = c("lambda.1se", 
    "lambda.min"), ...) {
    if (is.numeric(s)) 
        lambda <- s else if (is.character(s)) {
        s <- match.arg(s)
        lambda <- object[[s]]
    } else stop("Invalid form for s")
    predict(object$gcdnet.fit, newx, s = lambda, ...)
} 

Try the gcdnet package in your browser

Any scripts or data that you put into this service are public.

gcdnet documentation built on May 2, 2019, 5:42 a.m.