1
1
2
2
<!-- badges: start -->
3
3
4
- [ ![ Travis build
5
- status] ( https://travis-ci.org/m-clark/confusionMatrix.svg?branch=master )] ( https://travis-ci.org/m-clark/confusionMatrix )
6
- [ ![ AppVeyor Build
7
- Status] ( https://ci.appveyor.com/api/projects/status/github/m-clark/confusionMatrix?branch=master&svg=true )] ( https://ci.appveyor.com/project/m-clark/confusionMatrix )
4
+ [ ![ R build
5
+ status] ( https://github.com/m-clark/confusionMatrix/workflows/R-CMD-check/badge.svg )] ( https://github.com/m-clark/confusionMatrix/actions )
8
6
[ ![ Codecov test
9
7
coverage] ( https://codecov.io/gh/m-clark/confusionMatrix/branch/master/graph/badge.svg )] ( https://codecov.io/gh/m-clark/confusionMatrix?branch=master )
10
8
[ ![ Lifecycle:
11
9
maturing] ( https://img.shields.io/badge/lifecycle-experimental-blue.svg )] ( https://www.tidyverse.org/lifecycle/#experimental )
12
- <!-- <a href="https://github.com/m-clark/confusionMatrix" alt="Miscellaneous Shenanigans"> -->
13
- <!-- <img src="https://img.shields.io/badge/Status-Meh-ff5500.svg?colorA=00aaff&longCache=true&style=for-the-badge" width=20.5%/></a> -->
14
10
15
11
<!-- badges: end -->
16
12
@@ -41,27 +37,26 @@ result
41
37
42
38
$Accuracy
43
39
# A tibble: 1 x 6
44
- Accuracy `Accuracy LL` `Accuracy UL` `Accuracy Guess~ `Accuracy P-val~
40
+ Accuracy `Accuracy LL` `Accuracy UL` `Accuracy Guess… `Accuracy P-val…
45
41
<dbl> <dbl> <dbl> <dbl> <dbl>
46
- 1 0.524 0.460 0.587 0.64 1.000
47
- # ... with 1 more variable: `Frequency Table` <list>
42
+ 1 0.596 0.532 0.657 0.692 0.999
43
+ # … with 1 more variable: `Frequency Table` <list>
48
44
49
45
$Other
50
46
# A tibble: 1 x 19
51
- Positive N `N Positive` `N Negative` `Sensitivity/Re~
52
- <chr> <int> <int> <int> <dbl>
53
- 1 a 250 90 160 0.344
54
- # ... with 14 more variables: `Specificity/TNR` <dbl>,
55
- # `PPV/Precision` <dbl>, NPV <dbl>, `F1/Dice` <dbl>, Prevalence <dbl>,
56
- # `Detection Rate` <dbl>, `Detection Prevalence` <dbl>, `Balanced
57
- # Accuracy` <dbl>, FDR <dbl>, FOR <dbl>, `FPR/Fallout` <dbl>, FNR <dbl>,
58
- # `D Prime` <dbl>, AUC <dbl>
47
+ Positive N `N Positive` `N Negative` `Sensitivity/Re… `Specificity/TN…
48
+ <chr> <int> <int> <int> <dbl> <dbl>
49
+ 1 a 250 77 173 0.338 0.711
50
+ # … with 13 more variables: `PPV/Precision` <dbl>, NPV <dbl>, `F1/Dice` <dbl>,
51
+ # Prevalence <dbl>, `Detection Rate` <dbl>, `Detection Prevalence` <dbl>,
52
+ # `Balanced Accuracy` <dbl>, FDR <dbl>, FOR <dbl>, `FPR/Fallout` <dbl>,
53
+ # FNR <dbl>, `D Prime` <dbl>, AUC <dbl>
59
54
60
55
$`Association and Agreement`
61
56
# A tibble: 1 x 6
62
- Kappa `Adjusted Rand` Yule Phi Peirce Jaccard
63
- <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
64
- 1 -0.0305 -0.00699 -0.0663 -0.0305 0.364 0.457
57
+ Kappa `Adjusted Rand` Yule Phi Peirce Jaccard
58
+ <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
59
+ 1 0.0488 0.0116 0.113 0.0488 0.0486 0.549
65
60
66
61
``` r
67
62
result $ Accuracy $ `Frequency Table`
@@ -70,8 +65,8 @@ result$Accuracy$`Frequency Table`
70
65
[[1]]
71
66
Target
72
67
Predicted a b
73
- a 31 60
74
- b 59 100
68
+ a 26 50
69
+ b 51 123
75
70
76
71
``` r
77
72
result = confusion_matrix(
@@ -83,51 +78,49 @@ result = confusion_matrix(
83
78
result
84
79
```
85
80
86
- ```
87
- $Accuracy
88
- # A tibble: 5 x 2
89
- Statistic Value
90
- <chr> <dbl>
91
- 1 Accuracy 0.524
92
- 2 Accuracy LL 0.460
93
- 3 Accuracy UL 0.587
94
- 4 Accuracy Guessing 0.64
95
- 5 Accuracy P-value 1.000
96
-
97
- $Other
98
- # A tibble: 18 x 3
99
- Positive Statistic Value
100
- <chr> <chr> <dbl>
101
- 1 a N 250
102
- 2 a N Positive 90
103
- 3 a N Negative 160
104
- 4 a Sensitivity/Recall/TPR 0.344
105
- 5 a Specificity/TNR 0.625
106
- 6 a PPV/Precision 0.341
107
- 7 a NPV 0.629
108
- 8 a F1/Dice 0.343
109
- 9 a Prevalence 0.36
110
- 10 a Detection Rate 0.124
111
- 11 a Detection Prevalence 0.364
112
- 12 a Balanced Accuracy 0.485
113
- 13 a FDR 0.659
114
- 14 a FOR 0.371
115
- 15 a FPR/Fallout 0.375
116
- 16 a FNR 0.656
117
- 17 a D Prime -0.0817
118
- 18 a AUC 0.523
119
-
120
- $`Association and Agreement`
121
- # A tibble: 6 x 2
122
- Statistic Value
123
- <chr> <dbl>
124
- 1 Kappa -0.0305
125
- 2 Adjusted Rand -0.00699
126
- 3 Yule -0.0663
127
- 4 Phi -0.0305
128
- 5 Peirce 0.364
129
- 6 Jaccard 0.457
130
- ```
81
+ $Accuracy
82
+ # A tibble: 5 x 2
83
+ Statistic Value
84
+ <chr> <dbl>
85
+ 1 Accuracy 0.596
86
+ 2 Accuracy LL 0.532
87
+ 3 Accuracy UL 0.657
88
+ 4 Accuracy Guessing 0.692
89
+ 5 Accuracy P-value 0.999
90
+
91
+ $Other
92
+ # A tibble: 18 x 3
93
+ Positive Statistic Value
94
+ <chr> <chr> <dbl>
95
+ 1 a N 250
96
+ 2 a N Positive 77
97
+ 3 a N Negative 173
98
+ 4 a Sensitivity/Recall/TPR 0.338
99
+ 5 a Specificity/TNR 0.711
100
+ 6 a PPV/Precision 0.342
101
+ 7 a NPV 0.707
102
+ 8 a F1/Dice 0.340
103
+ 9 a Prevalence 0.308
104
+ 10 a Detection Rate 0.104
105
+ 11 a Detection Prevalence 0.304
106
+ 12 a Balanced Accuracy 0.524
107
+ 13 a FDR 0.658
108
+ 14 a FOR 0.293
109
+ 15 a FPR/Fallout 0.289
110
+ 16 a FNR 0.662
111
+ 17 a D Prime 0.137
112
+ 18 a AUC 0.538
113
+
114
+ $`Association and Agreement`
115
+ # A tibble: 6 x 2
116
+ Statistic Value
117
+ <chr> <dbl>
118
+ 1 Kappa 0.0488
119
+ 2 Adjusted Rand 0.0116
120
+ 3 Yule 0.113
121
+ 4 Phi 0.0488
122
+ 5 Peirce 0.0486
123
+ 6 Jaccard 0.549
131
124
132
125
### Installation
133
126
0 commit comments