For a finite joint weight mu of the target w and the recorded
label D, and a post-processing h mapping D to a score,
the best risk from the score is at least the best from D
(Research.P5.DataProcessing.bayes_risk_data_processing).
Usage
morie_bayes_risk_dpi(mu, w, h)
Arguments
- mu
Matrix of joint weights, rows indexed by target values, columns by
D values.
- w
Target value per row of mu.
- h
Integer vector mapping each column of mu to a score level.
Value
A list: risk_D, risk_R, dpi_holds.
References
MacKay DJC (2003). Information Theory, Inference, and Learning
Algorithms, Exercise 8.9. Cambridge.
Examples
mu <- matrix(c(0.3, 0.1, 0.1, 0.2, 0.05, 0.25), 2)
morie_bayes_risk_dpi(mu, w = c(0, 1), h = c(1, 1, 2))
#> $risk_D
#> [1] 0.1833333
#>
#> $risk_R
#> [1] 0.2130952
#>
#> $dpi_holds
#> [1] TRUE
#>
#> attr(,"theorem")
#> [1] "Research.P5.DataProcessing.bayes_risk_data_processing"