Skip to contents

y_hat = argmax of the weight-averaged class probabilities.

Usage

morie_geron_soft_voting(probabilities, weights = NULL)

Arguments

probabilities

(L, m, K) array, or a (L, K) matrix for a single instance.

weights

Optional non-negative voter weights.

Value

List with y_hat (0-based), mean_probabilities, confidence, margin.

Examples

P <- array(0, c(2, 2, 2))
P[1, , ] <- rbind(c(0.7, 0.3), c(0.6, 0.4))
P[2, , ] <- rbind(c(0.2, 0.8), c(0.4, 0.6))
r <- morie_geron_soft_voting(P)
str(r, max.level = 1)
#> List of 6
#>  $ y_hat             : int [1:2] 1 0
#>  $ mean_probabilities: num [1:2, 1:2] 0.45 0.5 0.55 0.5
#>  $ confidence        : num [1:2] 0.55 0.5
#>  $ margin            : num [1:2] 0.1 0
#>  $ estimate          : int [1:2] 1 0
#>  $ n                 : int 2