Description Usage Arguments Value Examples
From a 'DETs' object, the function extracts either computes the confidence interval (CI) of each DET curve of the object.
1 2 3 4 5 6 7 8 9 10 |
dets |
A 'DETs' object which will be used to extract or compute the CIs of the DET curves. |
conf |
A single numeric value into the (0,1) interval, which represents the confidence level of the CI of the DET Curve. Default: |
positive |
A string with the name of the 'positive' level which is setting as reference level of 'response'. |
parallel |
Boolean. By default |
ncores |
The number of nodes to be forked for the parallel computation of the CI. Default: the maximum available. None used if |
nboot |
The number of bootstrap replicates to be used for the computation of the CI. Default: |
plot |
If TRUE, the CIs will be plotted for the DET curves. Default: |
... |
Further attributes that will be passed to the |
A 'DETs' object containing the list of DET curves with their CIs, one per classifier.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | library(DET)
n = 500
#Predictors with normal distribution
set.seed(1235)
scoreNegative1 = rnorm(n, mean = 0.25, sd = 0.125)
set.seed(5321)
scoreNegative2 = rnorm(n, mean = 0.25, sd = 0.125)
set.seed(11452)
scorePositive1 = rnorm(n, mean = 0.55, sd = 0.125)
set.seed(54321)
scorePositive2 = rnorm(n, mean = 0.65, sd = 0.125)
response = as.factor(c(rep(c("target"), times = n), rep(c("nontarget"), times = n)))
predictor1 = c(scoreNegative1, scorePositive1)
predictor2 = c(scoreNegative2, scorePositive2)
predictors = matrix(c(predictor1, predictor2), ncol = 2)
colnames(predictors) = c("DET1", "DET2")
detCurves = detc(
response,
predictors,
positive = "target",
names = colnames(predictors)
)
#Run in parallel for a faster execution activating logical argument 'parallel'
#and setting the number of cores of your computer
#logical argument 'parallel'
detCurvesWithConfidenceInterval = detc.ci(
dets = detCurves,
positive = "target",
names = colnames(predictors),
conf = 0.95,
parallel = TRUE,
ncores = 2
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.