Skip to contents

y_hat = mode of the L predicted labels; ties go to the lowest class index and are counted.

Usage

morie_geron_hard_voting(predictions)

Arguments

predictions

(L, m) integer label matrix.

Value

List with y_hat (0-based), vote_counts, agreement, ties.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_hard_voting(V)
#> $y_hat
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $vote_counts
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
#> [1,]    0    1    0    0    0    0    0    0    0
#> [2,]    0    0    1    0    0    0    0    0    0
#> [3,]    0    0    0    1    0    0    0    0    0
#> [4,]    0    0    0    0    1    0    0    0    0
#> [5,]    0    0    0    0    0    1    0    0    0
#> [6,]    0    0    0    0    0    0    1    0    0
#> [7,]    0    0    0    0    0    0    0    1    0
#> [8,]    0    0    0    0    0    0    0    0    1
#> 
#> $agreement
#> [1] 1 1 1 1 1 1 1 1
#> 
#> $ties
#> [1] 0
#> 
#> $estimate
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $n
#> [1] 8
#>