[][src]Function hypo::optimal_guess

pub fn optimal_guess<H, F>(n: usize, hypos: &[H], f: F) -> Option<usize> where
    F: Fn(&H, usize) -> bool

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 experiments
  • f is a function that makes a prediction from experiment