-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added lr_pos and lr_neg to coords (#102)
- Loading branch information
Showing
8 changed files
with
3,106 additions
and
2,676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4,683 changes: 2,490 additions & 2,193 deletions
4,683
tests/testthat/helper-coords-expected-smooth.R
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,46 @@ | ||
expected_roc_utils_calc_coords <- | ||
structure(c(-1, -2, -3, -4, 1, 0.5, 0.1, 0, 0, 0.5, 0.9, 1, 0.36283185840708, | ||
0.5, 0.609734513274336, 0.63716814159292, 0, 36, 64.8, 72, 41, | ||
20.5, 4.1, 0, 0, 20.5, 36.9, 41, 72, 36, 7.2, 0, NaN, 0.63716814159292, | ||
0.63716814159292, 0.63716814159292, 0.36283185840708, 0.36283185840708, | ||
0.36283185840708, NaN, 1, 0.5, 0.1, 0, 0, 0.5, 0.9, 1, 1, 0.5, | ||
0.1, 0, 0, 0.5, 0.9, 1, 0.63716814159292, 0.63716814159292, 0.63716814159292, | ||
NaN, 1, 0.5, 0.1, 0, 0, 0.5, 0.9, 1, 0.63716814159292, 0.5, 0.390265486725664, | ||
0.36283185840708, NaN, 0.36283185840708, 0.36283185840708, 0.36283185840708, | ||
0.63716814159292, 0.63716814159292, 0.63716814159292, NaN, 0.36283185840708, | ||
0.36283185840708, 0.36283185840708, NaN, 1, 0.5, 0.1, 0, 1, 0.50462962962963, | ||
0.108333333333333, 0.00925925925925926, 0.00925925925925926, | ||
0.252314814814815, 0.810092592592593, 1), .Dim = c(4L, 24L), .Dimnames = list( | ||
NULL, c("threshold", "sensitivity", "specificity", "accuracy", | ||
"tn", "tp", "fn", "fp", "npv", "ppv", "tpr", "tnr", "fpr", | ||
"fnr", "fdr", "1-specificity", "1-sensitivity", "1-accuracy", | ||
"1-npv", "1-ppv", "precision", "recall", "youden", "closest.topleft" | ||
))) | ||
structure(c(-1, -2, -3, -4, 1, 0.5, 0.10000000000000001, 0, 0, | ||
0.5, 0.90000000000000002, 1, 0.36283185840707965, 0.5, 0.60973451327433625, | ||
0.63716814159292035, 0, 36, 64.799999999999997, 72, 41, 20.5, | ||
4.1000000000000005, 0, 0, 20.5, 36.899999999999999, 41, 72, 36, | ||
7.2000000000000028, 0, NaN, 0.63716814159292035, 0.63716814159292035, | ||
0.63716814159292035, 0.36283185840707965, 0.36283185840707965, | ||
0.36283185840707954, NaN, 1, 0.5, 0.10000000000000001, 0, 0, | ||
0.5, 0.90000000000000002, 1, 1, 0.5, 0.099999999999999978, 0, | ||
0, 0.5, 0.89999999999999991, 1, 0.63716814159292035, 0.63716814159292035, | ||
0.63716814159292035, NaN, 1, 0.5, 0.099999999999999978, 0, 0, | ||
0.5, 0.90000000000000002, 1, 0.63716814159292035, 0.5, 0.39026548672566375, | ||
0.36283185840707965, NaN, 0.36283185840707965, 0.36283185840707965, | ||
0.36283185840707965, 0.63716814159292035, 0.63716814159292035, | ||
0.63716814159292046, NaN, 0.36283185840707965, 0.36283185840707965, | ||
0.36283185840707954, NaN, 1, 0.5, 0.10000000000000001, 0, 1, | ||
1, 1.0000000000000002, NaN, NaN, 1, 1, 1, 1, 0.50462962962962965, | ||
0.10833333333333334, 0.009259259259259257, 0.009259259259259257, | ||
0.25231481481481483, 0.8100925925925927, 1), .Dim = c(4L, 26L | ||
), .Dimnames = list(NULL, c("threshold", "sensitivity", "specificity", | ||
"accuracy", "tn", "tp", "fn", "fp", "npv", "ppv", "tpr", "tnr", | ||
"fpr", "fnr", "fdr", "1-specificity", "1-sensitivity", "1-accuracy", | ||
"1-npv", "1-ppv", "precision", "recall", "lr_pos", "lr_neg", | ||
"youden", "closest.topleft"))) | ||
|
||
expected_roc_utils_calc_coords.percent <- | ||
structure(c(-1, -2, -3, -4, 100, 50, 10, 0, 0, 50, 90, 100, 36.283185840708, | ||
50, 60.9734513274336, 63.716814159292, 0, 36, 64.8, 72, 41, 20.5, | ||
4.1, 0, 0, 20.5, 36.9, 41, 72, 36, 7.2, 0, NaN, 63.716814159292, | ||
63.716814159292, 63.716814159292, 36.283185840708, 36.283185840708, | ||
36.283185840708, NaN, 100, 50, 10, 0, 0, 50, 90, 100, 100, 50, | ||
10, 0, 0, 50, 90, 100, 63.716814159292, 63.716814159292, 63.716814159292, | ||
NaN, 100, 50, 10, 0, 0, 50, 90, 100, 63.716814159292, 50, 39.0265486725664, | ||
36.283185840708, NaN, 36.283185840708, 36.283185840708, 36.283185840708, | ||
63.716814159292, 63.716814159292, 63.716814159292, NaN, 36.283185840708, | ||
36.283185840708, 36.283185840708, NaN, 100, 50, 10, 0, 100, 50.462962962963, | ||
10.8333333333333, 0.925925925925926, 0.925925925925926, 25.2314814814815, | ||
81.0092592592593, 100), .Dim = c(4L, 24L), .Dimnames = list(NULL, | ||
c("threshold", "sensitivity", "specificity", "accuracy", | ||
"tn", "tp", "fn", "fp", "npv", "ppv", "tpr", "tnr", "fpr", | ||
"fnr", "fdr", "1-specificity", "1-sensitivity", "1-accuracy", | ||
"1-npv", "1-ppv", "precision", "recall", "youden", "closest.topleft" | ||
))) | ||
structure(c(-1, -2, -3, -4, 100, 50, 10, 0, 0, 50, 90, 100, 36.283185840707965, | ||
50, 60.973451327433622, 63.716814159292035, 0, 36, 64.799999999999997, | ||
72, 41, 20.5, 4.0999999999999996, 0, 0, 20.5, 36.899999999999999, | ||
41, 72, 36, 7.2000000000000028, 0, NaN, 63.716814159292035, 63.716814159292042, | ||
63.716814159292035, 36.283185840707965, 36.283185840707965, 36.283185840707951, | ||
NaN, 100, 50, 10, 0, 0, 50, 90, 100, 100, 50, 10, 0, 0, 50, 90, | ||
100, 63.716814159292035, 63.716814159292035, 63.716814159292042, | ||
NaN, 100, 50, 10, 0, 0, 50, 90, 100, 63.716814159292035, 50, | ||
39.026548672566378, 36.283185840707965, NaN, 36.283185840707965, | ||
36.283185840707958, 36.283185840707965, 63.716814159292035, 63.716814159292035, | ||
63.716814159292049, NaN, 36.283185840707965, 36.283185840707965, | ||
36.283185840707951, NaN, 100, 50, 10, 0, 1, 1, 1.0000000000000002, | ||
NaN, NaN, 1, 1, 1, 100, 50.462962962962962, 10.833333333333334, | ||
0.92592592592592571, 0.92592592592592571, 25.231481481481481, | ||
81.009259259259267, 100), .Dim = c(4L, 26L), .Dimnames = list( | ||
NULL, c("threshold", "sensitivity", "specificity", "accuracy", | ||
"tn", "tp", "fn", "fp", "npv", "ppv", "tpr", "tnr", "fpr", | ||
"fnr", "fdr", "1-specificity", "1-sensitivity", "1-accuracy", | ||
"1-npv", "1-ppv", "precision", "recall", "lr_pos", "lr_neg", | ||
"youden", "closest.topleft"))) |
Oops, something went wrong.