plot.tune.cutoff: Plot cutoff tuning process from "'tune_cutoff'"

Description Usage Arguments Author(s) Examples

Description

Plots cutoff tuning process

Usage

1
2
## S3 method for class 'tune.cutoff'
plot(x, pch = 20, cex = 1.5, col = "red", ...)

Arguments

x

"tune_cutoff" object

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 col = "red"

...

other parameters in "plot()" function

Author(s)

Hui Lin, longqiman@gmail.com

Examples

 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)

happyrabbit/DataScienceR documentation built on May 17, 2019, 2:41 p.m.