Skip to main content

second_best_loss

Function second_best_loss 

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

Find the second-best loss (for computing loss_avoided).