Skip to contents

Counting delegated to morie_geron_confusion_matrix.

Usage

morie_geron_error_analysis(y_true, y_pred, top_k = 5)

Arguments

y_true, y_pred

Labels.

top_k

Confusions to list.

Value

List with normalized, error_matrix, top_confusions, worst_class, error_rate.

Examples

morie_geron_error_analysis(c(0, 0, 1, 1), c(0, 1, 1, 1))
#> $normalized
#>      [,1] [,2]
#> [1,]  0.5  0.5
#> [2,]  0.0  1.0
#> 
#> $error_matrix
#>      [,1] [,2]
#> [1,]    0  0.5
#> [2,]    0  0.0
#> 
#> $column_normalized
#>      [,1]      [,2]
#> [1,]    1 0.3333333
#> [2,]    0 0.6666667
#> 
#> $top_confusions
#> $top_confusions[[1]]
#> [1] 0.0 1.0 0.5
#> 
#> 
#> $per_class_error_rate
#> [1] 0.5 0.0
#> 
#> $worst_class
#> [1] 0
#> 
#> $labels
#> [1] 0 1
#> 
#> $error_rate
#> [1] 0.25
#> 
#> $accuracy
#> [1] 0.75
#> 
#> $estimate
#> [1] 0.25
#> 
#> $n
#> [1] 4
#> 
#> $method
#> [1] "row-normalised confusion matrix with the diagonal removed; counting delegated to hmcfm"
#>