Expected error reduction framework for active learning.

modAL.expected_error.expected_error_reduction(learner: modAL.models.learners.ActiveLearner, X: Union[list, numpy.ndarray, scipy.sparse.csr.csr_matrix], loss: str = 'binary', p_subsample: float = 1.0, n_instances: int = 1, random_tie_break: bool = False) → Tuple[numpy.ndarray, Union[list, numpy.ndarray, scipy.sparse.csr.csr_matrix]][source]

Expected error reduction query strategy.


Roy and McCallum, 2001 (

  • learner – The ActiveLearner object for which the expected error is to be estimated.
  • X – The samples.
  • loss – The loss function to be used. Can be ‘binary’ or ‘log’.
  • p_subsample – Probability of keeping a sample from the pool when calculating expected error. Significantly improves runtime for large sample pools.
  • n_instances – The number of instances to be sampled.
  • random_tie_break – If True, shuffles utility scores to randomize the order. This can be used to break the tie when the highest utility score is not unique.

The indices of the instances from X chosen to be labelled; the instances from X chosen to be labelled.