Function hypo::optimal_guess
source · pub fn optimal_guess<H, F>(n: usize, hypos: &[H], f: F) -> Option<usize>where
F: Fn(&H, usize) -> bool,
Expand description
Returns an optimal guess given a list of hypotheses.
An optimal guess is an experiment that is as close as possible to eliminating half the hypotheses when being tested.
Here, the experiment is referred to by an index.
n
is the number of available experimentsf
is a function that makes a prediction from experiment