Description Usage Arguments Value References See Also Examples
nproc
calculates the Neyman-Pearson Receiver Operating Characteristics
band for a given sequence of type I error values.
1 2 3 |
x |
n * p observation matrix. n observations, p covariates. |
y |
n 0/1 observatons. |
method |
base classification method(s).
|
delta |
the violation rate of the type I error. Default = 0.05. |
split |
the number of splits for the class 0 sample. Default = 1. For ensemble version, choose split > 1. |
split.ratio |
the ratio of splits used for the class 0 sample to train the classifier. Default = 0.5. |
n.cores |
number of cores used for parallel computing. Default = 1. |
randSeed |
the random seed used in the algorithm. |
... |
additional arguments. |
An object with S3 class nproc.
typeI.u |
sequence of upper bound of type I error. |
typeII.l |
sequence of lower bound of type II error. |
typeII.u |
sequence of upper bound of type II error. |
auc.l |
the auc value of the lower NP-ROC curve. |
auc.u |
the auc value of the upper NP-ROC curve. |
method |
the base classification method implemented. |
delta |
the violation rate. |
Xin Tong, Yang Feng, and Jingyi Jessica Li (2018), Neyman-Pearson (NP) classification algorithms and NP receiver operating characteristic (NP-ROC), Science Advances, 4, 2, eaao1659.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | n = 200
x = matrix(rnorm(n*2),n,2)
c = 1 - 3*x[,1]
y = rbinom(n,1,1/(1+exp(-c)))
#fit = nproc(x, y, method = 'svm')
fit2 = nproc(x, y, method = 'penlog')
##Plot the nproc curve
plot(fit2)
## Not run:
fit3 = nproc(x, y, method = 'penlog', n.cores = 2)
#In practice, replace 2 by the number of cores available 'detectCores()'
fit4 = nproc(x, y, method = 'penlog', n.cores = detectCores())
#Confidence nproc curves
fit6 = nproc(x, y, method = 'lda')
plot(fit6)
nproc ensembled version
fit7 = nproc(x, y, method = 'lda', split = 11)
plot(fit7)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.