1.5.3 Combining with other plots🔗ℹ

coefficient-path-renderers and cv-renderers return the curves, points and lines of the two plots as plot-lib renderers, without the axes. They combine with other renderers, here to mark the two choices of cross-validation on the coefficient path:

> (require plot/no-gui)
> (define (at lam) (- (log lam)))
> (plot-pict (list (coefficient-path-renderers cv)
                   (vrule (at (glmnet-cv-lambda-min cv)) #:style 'dot)
                   (vrule (at (glmnet-cv-lambda-1se cv)) #:style 'dot))
             #:x-label "-Log(λ)"
             #:y-label "Coefficients")

image