File:Glmnet4plot.svg: Difference between revisions
Jump to navigation
Jump to search
(library(glmnet) data(QuickStartExample) cvfit = cv.glmnet(x, y) fit = glmnet(x, y) oldpar <- par(mfrow=c(2,2)) plot(cvfit) # mse vs log(lambda) plot(fit) # coef vs L1 norm plot(fit, xvar = "lambda", label = TRUE) # coef vs log(lambda) plot(fit, xvar = "dev", label = TRUE) # coef vs Fraction Deviance Explained par(oldpar)) |
|||
Line 1: | Line 1: | ||
== Summary == | == Summary == | ||
<syntaxhighlight lang='rsplus'> | |||
library(glmnet) | library(glmnet) | ||
data(QuickStartExample) | data(QuickStartExample) | ||
Line 12: | Line 13: | ||
plot(fit, xvar = "dev", label = TRUE) # coef vs Fraction Deviance Explained | plot(fit, xvar = "dev", label = TRUE) # coef vs Fraction Deviance Explained | ||
par(oldpar) | par(oldpar) | ||
</syntaxhighlight> |
Latest revision as of 12:03, 13 April 2020
Summary
library(glmnet) data(QuickStartExample) cvfit = cv.glmnet(x, y) fit = glmnet(x, y) oldpar <- par(mfrow=c(2,2)) plot(cvfit) # mse vs log(lambda) plot(fit) # coef vs L1 norm plot(fit, xvar = "lambda", label = TRUE) # coef vs log(lambda) plot(fit, xvar = "dev", label = TRUE) # coef vs Fraction Deviance Explained par(oldpar)
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 12:01, 13 April 2020 | 563 × 563 (216 KB) | Brb (talk | contribs) | library(glmnet) data(QuickStartExample) cvfit = cv.glmnet(x, y) fit = glmnet(x, y) oldpar <- par(mfrow=c(2,2)) plot(cvfit) # mse vs log(lambda) plot(fit) # coef vs L1 norm plot(fit, xvar = "lambda", label = TRUE) # coef vs log(lambda) plot(fit, xvar = "dev", label = TRUE) # coef vs Fraction Deviance Explained par(oldpar) |
You cannot overwrite this file.
File usage
There are no pages that use this file.