Description Usage Arguments Value Caching Ties See Also Examples
boot.roc
calculates the ROC curve, initializes the settings
and calculates the bootstrap results for the true and false
positive rate at every relevant threshold. Missing values are removed with
a warning prior to bootstrapping.
1 2 |
pred |
A numeric vector. Contains predictions. |
true.class |
A logical vector. TRUE indicates the sample belonging to the positive class. |
stratify |
Logical. Indicates whether we use stratified bootstrap. Default to TRUE. Non-stratified bootstrap is not yet implemented. |
n.boot |
A number that will be coerced to integer. Specified the number of bootstrap replicates. Defaults to 1000. |
use.cache |
If true the bootstrapping results for the ROC curve will be pre-cached. This increases speed when the object is used often, but also takes up more memory. |
tie.strategy |
How to handle ties. See details below. |
A list of class fbroc.roc
, containing the elements:
prediction |
Input predictions. |
true.class |
Input classes. |
roc |
A data.frame containing the thresholds of the ROC curve and the TPR and FPR at these thresholds. |
n.thresholds |
Number of thresholds. |
n.boot |
Number of bootstrap replicates. |
use.cache |
Indicates if cache is used for this ROC object |
tie.strategy |
Used setting how to handle ties in predictors. |
n.pos |
Number of positive observations. |
n.neg |
Number of negative observations. |
auc |
The AUC of the original ROC curve. |
boot.tpr |
If the cache is enabled, a matrix containing the bootstrapped TPR at the thresholds. |
boot.fpr |
If the cache is enabled, a matrix containing the bootstrapped FPR at the thresholds. |
If you enable caching, boot.roc
calculates the requested number of bootstrap samples and
saves the TPR and FPR values for each iteration. This can take up a sizable portion of memory,
but it speeds up subsequent operations. This can be useful if you plan to use the ROC curve
multiple fbroc
functions.
You can set this parameter to either 1 or 2. If your numerical predictor has no ties, both settings
will produce the same results.
If you set tie.strategy
to 1 the ROC curve is built by connecting the TPR/FPR pairs for
neighboring thresholds. A tie.strategy of 2 indicates that the TPR calculated at a specific FPR
is the best TPR at a FPR smaller than or equal than the FPR specified. Defaults to 2.
http://www.epeter-stats.de/roc-curves-and-ties/, plot.fbroc.roc
,
print.fbroc.roc
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.