Description Usage Arguments Author(s) Examples
Plots cutoff tuning process
1 2 |
x |
" |
pch |
type of cutoff points, default is 20 |
cex |
size of cutoff points, default is 1.5, col = "red" |
col |
color of cutoff points, default is |
... |
other parameters in " |
Hui Lin, longqiman@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
data("sim1_da1")
trainx = sim1_da1[,1:50]
trainy = sim1_da1$y
library(glmnet)
fit <- cv.glmnet(as.matrix(trainx), trainy, family = "binomial")
test <- predict(fit, as.matrix(trainx), type = "link", s = "lambda.min")
test <- as.vector(test)
summary(test)
likelihood <- c(0.2, 0.5, 0.8)
y <- trainy
x <- tune_cutoff(test = test, y = y, likelihood = likelihood)
str(x)
plot.tune.cutoff(x)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.