Skip to main content

argmin_expected_loss

Function argmin_expected_loss 

Source
pub fn argmin_expected_loss<S, A, F>(
    actions: &[A],
    state_estimate: &S,
    loss_fn: F,
) -> Option<(usize, f64)>
where S: State, A: Action, F: Fn(&A, &S) -> f64,
Expand description

Compute the expected-loss-minimizing action given a posterior and loss fn.

This is a helper for implementations that use a point-estimate posterior. For richer posteriors (e.g., mixture distributions), implementations should override decide() directly.