
F1 score from a confusion matrix delegated to hmcfm (hmf1)
Source:R/geron_w4a_native.R
morie_geron_f1_score_alt.RdF1 score from a confusion matrix delegated to hmcfm (hmf1)
Examples
morie_geron_f1_score_alt(c(0, 0, 1, 1), c(0, 1, 1, 1))
#> $f1
#> [1] 0.8
#>
#> $precision
#> [1] 0.6666667
#>
#> $recall
#> [1] 1
#>
#> $tp
#> [1] 2
#>
#> $fp
#> [1] 1
#>
#> $fn
#> [1] 0
#>
#> $per_class_f1
#> [1] 0.6666667 0.8000000
#>
#> $labels
#> [1] 0 1
#>
#> $average
#> [1] "binary"
#>
#> $estimate
#> [1] 0.8
#>
#> $n
#> [1] 4
#>
#> $method
#> [1] "F1 = 2PR/(P+R) from a confusion matrix delegated to hmcfm"
#>