Description Usage Arguments Value Examples
'summary.mccf1()' calculates the MCC-F1 metric and the best threshold for a binary classification.
1 2 |
object |
S3 object of class "mccf1" object resulting from the function 'mccf1()' |
digits |
integer, used for number formatting with |
bins |
integer, representing number of bins used to divide up the range of normalized MCC when calculating the MCC-F1 metric (default = 100L) |
... |
other arguments ignored (for compatibility with generic) |
data.frame that shows the MCC-F1 metric (in the range [0,1]) and the best threshold (in the range [0,1])
1 2 3 4 5 6 7 8 9 10 11 12 | response <- c(rep(1L, 1000L), rep(0L, 10000L))
set.seed(2017)
predictor <- c(rbeta(300L, 12, 2), rbeta(700L, 3, 4), rbeta(10000L, 2, 3))
## Not run: summary(mccf1(response, predictor))
# mccf1_metric best_threshold
# 0.3508904 0.786905
summary(mccf1(response, predictor), bins = 50)
# mccf1_metric best_threshold
# 0.3432971 0.786905
## Not run: summary(mccf1(response, predictor), digits = 3)
# mccf1_metric best_threshold
# 0.351 0.787
|
Loading required package: ggplot2
mccf1_metric best_threshold
0.3432971 0.786905
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.